| Message written at 17 Nov 1998 21:44:55 +0000
I think this was misaddressed and should have bee sent to the csound
list.
==John
------- Start of forwarded message -------
Date: Mon, 16 Nov 1998 15:48:43 +0000
From: Olivier Pasquet
Hello,
NO CSOUND (YET?):
I am looking for a stochastic dynamic synthesis "thing" for mac or PC.
I have tryed Grainwave. It is simply brilliant.
I also have tryed to compile the Basic programme written in the Xenakis's
Formalised Music book. It is plenty of mistakes and it lacks: the SUB ARCHSEQ1
sub programme... and surely others I have not found yet.
Does someone know something about it? Where could I find the proper source,
examples, orc and sco maybe? I thought it would have been interesting to
understand quickly what Xenakis wrote. But I only have wasted my time and I
really hate this.
I have met a chap at the JIM98 (Journees d'Informatique Musicale) who works on
stochastic dynamic synthesis. But I cannot reach him. His name is Peter
Hoffman from TU Berlin (or Freie Uni). He did a kind of PhD at IRCAM last
year.
Olivier Pasquet.
- --------------------
Olivier PASQUET -- APU -- Music Faculty
OP101@mercury.anglia.ac.uk
www.sinclair.anglia.ac.uk/~op101.student.cambridge.anglia
- --------------------
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa18459;
18 Nov 98 13:40 GMT
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 1.92 #2)
for jpff@maths.bath.ac.uk
id 0zg7q8-0003R3-00; Wed, 18 Nov 1998 13:40:12 +0000
Received: from noether [144.173.8.10] by hermes via SMTP (NAA10050); Wed, 18 Nov 1998 13:32:48 GMT
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 18 Nov 1998 13:32:36 GMT
Received: from exim@wallace.maths.bath.ac.uk [138.38.100.104] by hermes via ESMTP (NAA06414); Wed, 18 Nov 1998 13:32:35 GMT
Received: from [138.38.99.25] (helo=maths.Bath.AC.UK ident=mmdf)
by wallace.maths.bath.ac.uk with smtp (Exim 1.92 #2)
for csound@maths.ex.ac.uk
id 0zg7il-0003QO-00; Wed, 18 Nov 1998 13:32:35 +0000
Date: Wed, 18 Nov 98 13:32:35 GMT
From: jpff@maths.bath.ac.uk
Subject: csound-orc.el
To: csound@maths.ex.ac.uk
Message-Id:
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Message written at 18 Nov 1998 12:39:44 +0000
I have updated the Emacs orchestra mode file to take account of the
new opcodes etc, and fixed a couple of minor bugs. There are still
some outstanding errors and infelicities which i will be looking at in
teh next few days.
==John ff
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa18465;
18 Nov 98 13:43 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 0zg7sp-00074O-00; Wed, 18 Nov 1998 13:42:59 +0000
Received: from noether [144.173.8.10] by hermes via SMTP (NAA09444); Wed, 18 Nov 1998 13:32:30 GMT
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 18 Nov 1998 13:32:20 GMT
Received: from exim@wallace.maths.bath.ac.uk [138.38.100.104] by hermes via ESMTP (NAA13281); Wed, 18 Nov 1998 13:32:19 GMT
Received: from [138.38.99.25] (helo=maths.Bath.AC.UK ident=mmdf)
by wallace.maths.bath.ac.uk with smtp (Exim 1.92 #2)
for csound@maths.ex.ac.uk
id 0zg7iV-0003QB-00; Wed, 18 Nov 1998 13:32:19 +0000
Date: Wed, 18 Nov 98 13:32:19 GMT
From: jpff@maths.bath.ac.uk
Subject: Re: Version 3.491
To: csound@maths.ex.ac.uk
Message-Id:
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Message written at 18 Nov 1998 11:07:11 +0000
--- Copy of mail to gelida@intercom.es ---
>>>>> "J" == Josep M Comajuncosas writes:
J> Im afraid I cannot understand the way your opcodes
J> schedule inst, iwhen, idur, ....
J> schedwhen ktrigger, kinst, kwhen, kdur, ....
J> are supposed to work.
J> schedule always triggers the instrument when it is called, no matter the
J> iwhen parameter. Also, if I put a schedule opcode inside a timout/reinit
J> statement to trigger an instrument several times strange things happen: it
J> seems that from the third activated event they are not turn off after idur.
J> Schedwhen seems even more strange to me, as it hangs Csound when ktrigger >
J> 0 , no matter kwhen.
J> Any help would be greatly welcome!! Im very excited with these new opcodes!
Bugs apart, schedule adds a new score event so
schedule inst, iwhen, idur, ....
is like adding
i instr when+p2 idur ...
to the score
schedwhen is sort of the same except at k-rate the value of ktrigger
is tested and the first time it is zero (if ever) and event is added.
I will admit that although I had tested them when i attempted to use
one of these in a composition last weekend something broke, but i was
so excited by the music that I did not check the program. It is on
the list of things to do.
wrt reinit I have not thought about that at all. I must think about
it; I suspect i wrote it on the assumption that they could only kick
in once. Humm...
==John ffitch
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa19397;
18 Nov 98 20:48 GMT
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 1.92 #2)
for jpff@maths.bath.ac.uk
id 0zgEWe-0003xd-00; Wed, 18 Nov 1998 20:48:33 +0000
Received: from noether [144.173.8.10] by hermes via SMTP (UAA08511); Wed, 18 Nov 1998 20:46:42 GMT
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 18 Nov 1998 20:46:30 GMT
Received: from servidor.unam.mx [132.248.10.5] by hermes via ESMTP (UAA05454); Wed, 18 Nov 1998 20:46:26 GMT
Received: from localhost (hpsilva@localhost)
by servidor.unam.mx (8.8.8/8.8.8) with SMTP id OAA19622
for ; Wed, 18 Nov 1998 14:45:48 -0600 (CST)
Date: Wed, 18 Nov 1998 14:45:47 -0600 (CST)
From: "Pablo Silva-Escuela Nacional de Musica, UNAM"
Reply-To: "Pablo Silva-Escuela Nacional de Musica, UNAM"
To: csound@maths.ex.ac.uk
Subject: (off topic) Hard drive death and other MacOS 8.1 conundrums
Message-ID:
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Hello Csounders:
An urgent question...
After experiencing my second catastrophic hard drive crash in a month
yesterday night, I was wondering whether anyone here has had any trouble
like this after upgrading to System 8.1?? The ironic part of this last
crash was that I lost all my data and installs 10 minutes after verifying
the integrity of my drive (old HFS) with Apple's First Aid utility (8.1
too, of course...) Is there any problem with System 8.1 that people are
aware of in regards to this? Something seems to be messing around
seriously with the catalog and Btree files.
And, does anyone here know if it is possible to install copy protection
(for instance Max 3.5.8, system 8 disk) on the new HFS+ formatted drives
safely??
Thanks for the feedback
Pablo Silva
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa19509;
18 Nov 98 21:46 GMT
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 1.92 #2)
for jpff@maths.bath.ac.uk
id 0zgFQt-00040d-00; Wed, 18 Nov 1998 21:46:39 +0000
Received: from noether [144.173.8.10] by hermes via SMTP (VAA15288); Wed, 18 Nov 1998 21:45:20 GMT
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 18 Nov 1998 21:45:08 GMT
Received: from root@www.inx.de [195.21.255.251] by hermes via SMTP (VAA21230); Wed, 18 Nov 1998 21:45:07 GMT
Received: by www.inx.de (Smail3.2.0.96inx)
from berlin.snafu.de (195.21.164.87) with esmtp
id ; Wed, 18 Nov 1998 22:45:05 +0100 (MET)
Message-ID: <36534E3B.F308D5EB@berlin.snafu.de>
Date: Wed, 18 Nov 1998 22:46:20 +0000
From: Andre Bartetzki
Organization: STEAM HfM Berlin
X-Mailer: Mozilla 4.04 (Macintosh; I; PPC)
MIME-Version: 1.0
To: csound
Subject: Re: pink noise in cmask
References: <36524D91.89901BD6@flash.net> <36525049.B271092C@flash.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
pete moss wrote:
>
> actually i mean, will
> rnd lin 1
> give me pink noise?
>
> pete
>
> pete moss wrote:
>
> > anyone use cmask? will using the line generator give me pink noise?
> > should i use the default value of -1 or something different? any hints?
> >
> > thanks
> > pete
If you use
rnd lin 1
you get more lower values (near 0.0) than higher ones (near 1.0).
(lin -1 gives you the reverse result)
rnd exp 1 is much better for the simulation of pink noise than lin 1.
But this is not a true pink noise. That means the same energy or density is in
every octave or any other interval, i.e. if you have a logarithmic scale pink
noise is like a uniform distribution.
Andre
--
--------------------------------------------------
Andre Bartetzki http://www.kgw.tu-berlin.de/~abart
Studio fuer elektroakustische Musik http://www.kgw.tu-berlin.de/~abart/Steam/steam.html
Hochschule fuer Musik Berlin http://www.hfm-berlin.de
Tel. +49-30-4726629
Tel. +49-30-203092488
--------------------------------------------------
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa19526;
18 Nov 98 21:56 GMT
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 1.92 #2)
for jpff@maths.bath.ac.uk
id 0zgFa8-000415-00; Wed, 18 Nov 1998 21:56:12 +0000
Received: from noether [144.173.8.10] by hermes via SMTP (VAA19240); Wed, 18 Nov 1998 21:55:01 GMT
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 18 Nov 1998 21:54:50 GMT
Received: from root@www.inx.de [195.21.255.251] by hermes via SMTP (VAA14040); Wed, 18 Nov 1998 21:54:49 GMT
Received: by www.inx.de (Smail3.2.0.96inx)
from berlin.snafu.de (195.21.164.87) with esmtp
id ; Wed, 18 Nov 1998 22:54:47 +0100 (MET)
Message-ID: <36535084.6C044EC5@berlin.snafu.de>
Date: Wed, 18 Nov 1998 22:56:05 +0000
From: Andre Bartetzki
Organization: STEAM HfM Berlin
X-Mailer: Mozilla 4.04 (Macintosh; I; PPC)
MIME-Version: 1.0
To: Csound Mailing List
Subject: Re: GENDY???
References:
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
> From: Olivier Pasquet
>
> Hello,
>
> NO CSOUND (YET?):
> I am looking for a stochastic dynamic synthesis "thing" for mac or PC.
> I have tryed Grainwave. It is simply brilliant.
>
> I also have tryed to compile the Basic programme written in the Xenakis's
> Formalised Music book. It is plenty of mistakes and it lacks: the SUB ARCHSEQ1
> sub programme... and surely others I have not found yet.
> Does someone know something about it? Where could I find the proper source,
> examples, orc and sco maybe? I thought it would have been interesting to
> understand quickly what Xenakis wrote. But I only have wasted my time and I
> really hate this.
> I have met a chap at the JIM98 (Journees d'Informatique Musicale) who works on
> stochastic dynamic synthesis. But I cannot reach him. His name is Peter
> Hoffman from TU Berlin (or Freie Uni). He did a kind of PhD at IRCAM last
> year.
>
> Olivier Pasquet.
>
As far as I know, Peter Hofmann works at the CeMaMu (Xenakis' institute in Paris).
I think he has rewritten the code in C or JAVA.
Stochastic dynamic synthesis opcodes in Csound would be very nice :)
Andre
--------------------------------------------------
Andre Bartetzki http://www.kgw.tu-berlin.de/~abart
Studio fuer elektroakustische Musik http://www.kgw.tu-berlin.de/~abart/Steam/steam.html
Hochschule fuer Musik Berlin http://www.hfm-berlin.de
Tel. +49-30-4726629
Tel. +49-30-203092488
--------------------------------------------------
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa19628;
18 Nov 98 22:46 GMT
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 1.92 #2)
for jpff@maths.bath.ac.uk
id 0zgGMS-00043u-00; Wed, 18 Nov 1998 22:46:08 +0000
Received: from noether [144.173.8.10] by hermes via SMTP (WAA27185); Wed, 18 Nov 1998 22:45:04 GMT
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 18 Nov 1998 22:44:52 GMT
Received: from root@mail.eclipse.net [207.207.192.13] by hermes via ESMTP (WAA18878); Wed, 18 Nov 1998 22:44:51 GMT
Received: from resophonic.com (cnj1-07-92.eclipse.net [207.207.244.92])
by mail.eclipse.net (8.9.1a/8.9.1) with ESMTP id RAA21410;
Wed, 18 Nov 1998 17:44:49 -0500 (EST)
Message-ID: <36534094.645EF831@resophonic.com>
Date: Wed, 18 Nov 1998 16:48:04 -0500
From: Troy Straszheim
Reply-To: troy@resophonic.com
Organization: Resophonic Systems, Etc.
X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.34 i686)
MIME-Version: 1.0
To: csound@maths.ex.ac.uk
Subject: x-class noise opcodes
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
aloha, all:
are the "x-class noise opcodes" broken? the current build of the linux
version does not recognize
a1 atrirand 32000
in an .orc file. I get "no legal opcode". Many of the other x-class
noise opcodes seem to be broken as well, I didn't try all of them.
hmm?
thanks,
troy
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa19685;
18 Nov 98 23:26 GMT
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 1.92 #2)
for jpff@maths.bath.ac.uk
id 0zgGzq-00045x-00; Wed, 18 Nov 1998 23:26:50 +0000
Received: from noether [144.173.8.10] by hermes via SMTP (XAA19227); Wed, 18 Nov 1998 23:25:48 GMT
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 18 Nov 1998 23:25:41 GMT
Received: from root@lix.intercom.es [194.179.21.2] by hermes via ESMTP (XAA20836); Wed, 18 Nov 1998 23:25:39 GMT
Received: from intercom.es (iv1-246.intercom.es [195.76.154.246]) by lix.intercom.es (8.7.3/8.6.12) with ESMTP id AAA32155; Thu, 19 Nov 1998 00:26:27 +0100
Message-ID: <3653571B.67C1E61F@intercom.es>
Date: Thu, 19 Nov 1998 00:24:11 +0100
From: Josep M Comajuncosas
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
To: Andre Bartetzki
CC: Csound Mailing List
Subject: Re: GENDY???
References: <36535084.6C044EC5@berlin.snafu.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Andre Bartetzki wrote:
> As far as I know, Peter Hofmann works at the CeMaMu (Xenakis' institute in Paris).
> I think he has rewritten the code in C or JAVA.
> Stochastic dynamic synthesis opcodes in Csound would be very nice :)
As far as I know Stochastic Dynamic Synthesis can be modelled with the existing opcodes.
Not to mention that the results are not as impressing as the beautiful statistical maths
behind it... I personally think that Xenaquis was more succesful applying stochastic
procedures to higher level composition/orchestration than to pure sound synthesis. One
cannon forget the spectra.
Josep M Comajuncosas
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa20122;
19 Nov 98 3:40 GMT
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 1.92 #2)
for jpff@maths.bath.ac.uk
id 0zgKx3-0004Ki-00; Thu, 19 Nov 1998 03:40:13 +0000
Received: from noether [144.173.8.10] by hermes via SMTP (DAA22598); Thu, 19 Nov 1998 03:37:55 GMT
Received: from exeter.ac.uk by maths.ex.ac.uk; Thu, 19 Nov 1998 03:37:45 GMT
Received: from howl.werewolf.net [206.103.224.20] by hermes via ESMTP (DAA20173); Thu, 19 Nov 1998 03:37:44 GMT
Received: from default (dial158.werewolf.net [206.103.225.168])
by howl.werewolf.net (8.9.0/8.9.0) with SMTP id VAA25356
for ; Wed, 18 Nov 1998 21:32:11 -0600 (CST)
Message-ID: <000301be136e$7c700900$a8e167ce@default>
From: Hans Mikelson
To: Csound
Subject: EQ Filters Orc/Sco
Date: Wed, 18 Nov 1998 21:41:25 -0600
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Hi,
Here are a low shelf and a peaking EQ filter posted by Chris Townsend to the
music-dsp list and a high shelf filter by me derived from the low shelf
filter. The Q looks like it behaves very nicely above sqrt(.5) making a
nice resonant peak. Below sqrt(.5) it gives a much shallower roll-off which
may also be useful.
Good Luck,
Hans Mikelson
; ORCHESTRA
;----------------------------------------------------------------
; Biquadratic Equalizer Filters
; Coded by Hans Mikelson November 1998
;----------------------------------------------------------------
sr=44100
kr=4410
ksmps=10
nchnls=2
;----------------------------------------------------------------
; Low Shelf by Chris Townsend converted to Csound by Hans Mikelson
;----------------------------------------------------------------
instr 11
ifc = p4 ; Center / Shelf
iq = p5 ; Quality factor sqrt(.5) is no resonance
igain = p6 ; Gain/Cut in dB
i2pi = 2*3.14159265
iomega0 = i2pi*ifc/sr
ik = tan(iomega0/2)
iv = ampdb(igain) ; Convert dB to Amplitude
kb0 = 1+sqrt(2*iv)*ik+iv*ik*ik ; Compute the coefficients
kb1 = 2*(iv*ik*ik-1)
kb2 = 1-sqrt(2*iv)*ik+iv*ik*ik
ka0 = 1+ik/iq+ik*ik
ka1 = 2*(ik*ik-1)
ka2 = 1-ik/iq+ik*ik
asig rand 5000 ; Random number source for testing
aout biquad asig, kb0, kb1, kb2, ka0, ka1, ka2 ; Biquad filter
outs aout, aout ; Output the results
endin
;----------------------------------------------------------------
; High Shelf by Hans Mikelson derived from low shelf by Chris Townsend
;----------------------------------------------------------------
instr 12
ifc = p4 ; Center / Shelf
iq = p5 ; Quality factor sqrt(.5) is no resonance
igain = p6 ; Gain/Cut in dB
ipi = 3.14159265
i2pi = 2*ipi
iomega0 = i2pi*ifc/sr
ik = tan((ipi-iomega0)/2)
iv = ampdb(igain) ; Convert dB to Amplitude
kb0 = 1+sqrt(2*iv)*ik+iv*ik*ik ; Compute the coefficients
kb1 = -2*(iv*ik*ik-1)
kb2 = 1-sqrt(2*iv)*ik+iv*ik*ik
ka0 = 1+ik/iq+ik*ik
ka1 = -2*(ik*ik-1)
ka2 = 1-ik/iq+ik*ik
asig rand 5000 ; Random number source for testing
aout biquad asig, kb0, kb1, kb2, ka0, ka1, ka2 ; Biquad filter
outs aout, aout ; Output the results
endin
;----------------------------------------------------------------
; Peaking EQ by Chris Townsend converted to Csound by Hans Mikelson
;----------------------------------------------------------------
instr 13
ifc = p4 ; Center / Shelf
iq = p5 ; Quality factor
igain = p6 ; Gain/Cut in dB
ipi = 3.14159265
i2pi = 2*ipi
iomega0 = i2pi*ifc/sr
ik = tan(iomega0/2)
iv = ampdb(igain) ; Convert dB to Amplitude
kb0 = 1+iv*ik/iq+ik*ik ; Compute the coefficients
kb1 = 2*(ik*ik-1)
kb2 = 1-iv*ik/iq+ik*ik
ka0 = 1+ik/iq+ik*ik
ka1 = 2*(ik*ik-1)
ka2 = 1-ik/iq+ik*ik
asig rand 5000 ; Random number source for testing
aout biquad asig, kb0, kb1, kb2, ka0, ka1, ka2 ; Biquad filter
outs aout, aout ; Output the results
endin
; SCORE
; Low shelf
; Sta Dur Fcenter BandWidth(Octaves) Boost/Cut(dB)
i11 0 1 1000 .707 12
i11 + . 5000 .707 12
i11 . . 1000 .707 -12
i11 . . 5000 .707 -12
; High Shelf
i12 4 1 1000 .707 12
i12 + . 5000 .707 12
i12 . . 1000 .707 -12
i12 . . 5000 .707 -12
; EQ
i13 8 1 1000 .707 12
i13 + . 5000 .707 12
i13 . . 1000 .707 -12
i13 . . 5000 .707 -12
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa20199;
19 Nov 98 4:33 GMT
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 1.92 #2)
for jpff@maths.bath.ac.uk
id 0zgLmV-0004N2-00; Thu, 19 Nov 1998 04:33:23 +0000
Received: from noether [144.173.8.10] by hermes via SMTP (EAA12598); Thu, 19 Nov 1998 04:31:31 GMT
Received: from exeter.ac.uk by maths.ex.ac.uk; Thu, 19 Nov 1998 04:31:20 GMT
Received: from relay.pathfinder.com [204.71.242.18] by hermes via ESMTP (EAA19425); Thu, 19 Nov 1998 04:31:19 GMT
Received: from panix.com (dan.pathfinder.com [206.27.98.18]) by pathfinder.com (*private*/SMI-SVR4) with ESMTP
id XAA09358; Wed, 18 Nov 1998 23:30:57 -0500 (EST)
X-Authentication-Warning: relay.pathfinder.com: Host dan.pathfinder.com [206.27.98.18] claimed to be panix.com
Message-ID: <36539EFF.7122E6B5@panix.com>
Date: Wed, 18 Nov 1998 23:31:03 -0500
From: Michael Coble
Reply-To: coble@panix.com
Organization: Smiling Dog Apps
X-Mailer: Mozilla 4.5 (Macintosh; U; PPC)
MIME-Version: 1.0
To: zarmzarm@erols.com
CC: eric@iamas.ac.jp, csound@maths.ex.ac.uk
Subject: Re: Perl OOP for Csound
References: <199811101832.DAA32370@eric.iamas.ac.jp> <36496476.534C@erols.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
> > This is not to say "don't use OOP", but rather to say, "think very
> > carefully about if you really need it". Some of the data manipulations
> > Paul mentioned might well benefit from OOP if they require maintaining
> > state information.
>
> Such as keeping track of time? I thought I would do that with an
> exported global value so the user would have free reign to f**k it up
> however they saw fit at any time.
>
Just for the record, perl5 has OO concepts, but is not like the C++ OO concepts
in many respects. Take for example that ALL variables and methods in perl5 are
inherently global unless you take steps to make them not global (like with "my"
and "local" which go away when out of scope). There is also no support for
friends of classes and protected members of classes, which are typically
associated as being part of the OO framework.
In perl5, the basic way to encapsulate is to make packages. All variables and
methods in packages are global to the package, but you can still get at them by
referencing them with their full package name. So, for instance if you have a
main variable foo, and a foo variable in the package bar, you can get at both by
the following:
use FOO;
BAR::foo = 1;
foo = 1;
You can encapsulate a method in a package by explicitly exporting only the
methods that you want to export. Methods that are not explicitly exported are
unavailable outside the package, but within the package, they are, thus concepts
like friends and protected methods within a package are not supported.
Anyway, OO or not, just define a variable for time in the package main, and
users can "have free reign to f**k it up" as much as they want:)
--
Michael Coble, Time Inc. New Media, Pathfinder
Music: http://pathfinder.com/pathfinder/staff/mcoble/music/
Gallery: http://www.panix.com/~coble, representing various artists
Hitman: http://pathfinder.com/pathfinder/staff/mcoble/
Work: http://pathfinder.com/ |