Csound Csound-dev Csound-tekno Search About

Re: [Csound parser, monsters, dlls]

Date1998-02-21 13:26
FromRichard Dobson
SubjectRe: [Csound parser, monsters, dlls]
Sorry, another long post:

Nicola Bernardini wrote:

> [snip]
>
> 2) dynamic linking: the purpose I meant was exactely NOT to create
>    a monster: a small application which would load the library it
>    needed at run-time; I would'nt go very far to look on how to do
>    that: just have an ASCII config file somewhere in 'the right place'
>    which has the connection opcode-library; during parsing, csound
>    builds a linked lists of NULL terminated OENTRY table out of all
>    the libraries it needs; each library has an OENTRY table which it
>    links when it dlopen()s it, basta. Simple means portable, and it
>    also means that it even has some chance to work...
>

It seems to me, from my incomplete knowledge of the Windows way of doing
things, that there are two related, primary issues with regard to
implementing  Csound with dynamic-link libraries.

1. The use of a dll increases the load time. I have not yet done any
structured benchmark tests with homemade dlls, but I suspect that loading a
dll for each opcode will be VERY inefficient. An explicit loadLibrary()
function will minimize search time, but the linking still needs to be done. It
is also, in many cases, impractical - the opcode for 'oscil', for example,
maps to several private opcodes depending on the i/o rate of the arguments.
The dll will not contain 'an opcode' as such, since it is not a function, more
a symbolic name for a particular collection of functions and data.There are
several ways in which opcodes might be organised by dll - keeping the oldest
core opcodes in the main application and linking only to the larger monolithic
ones, arranging dll's more-or-less as the manual differentiates them, eg
generators.dll, modifiers.dll and zak.dll, and so on. Another argument would
be that a certain core set of opcodes from all these groups are used
frequently, and so should logically be grouped together. Just how small should
the main module be?

(Note that Windows does not just link individual functions from in a dll into
an applications execution space, but the whole dll image. It is also common
practice for dll functions to call other functions in the same dll, and in
other dlls.
Knowledge of the exported functions in the dll is built into the main
aplication at compile time. )

One argument for organizing the libraries by function type is that it would
enable alternative programming styles to be used, not least C++, in which
'oscil' would, for example, be derived from a 'generator' base class. This
implementation is hidden inside the dll, which can still export the public
opcode functions as they are. Someone might even elect to hand-code functions
in assembler!

2. They require a more consistent structuring of the Csound code, eliminating
globals and statics as much as possible (going to C++ would achieve much of
this almost automatically), and more structured error handling - we cannot
have a function in a dll doing a hard exit, or trying to call printf(). If all
errors and messages are propagated back to the high-level framework functions,
the same dlls can be used in either commandline or GUI environments. Many of
the globals and statics currently in the code seem to have arisen because of
the way Csound has been developed, incrementally, and existing functions  are
not provided with enough parameters for newer facilities.
I found a good example of this just this week, in soundio.c, where the legacy
function rewriteheader() only receives the datasize in bytes, and I needed the
number of channels too to update the WAVE header for the floating-point
format. This code relies on the fact that  Csound is never asked to write
more than one audio stream.

In short, making Csound dll-ready is a major task, with more than one
reasonable strategy available, probably none of which solves all problems. An
important early task (as I think someone has already suggested to the list -
sorry, I forget who!) is to build a comprehensive  analysis of the whole
Csound call tree. Visual C++ does at least provide some fundamental tools to
do this, as it can display function call trees both upwards and downwards,
from any point. If someone has a suitably powerful code analyser, perhaps they
might like to do this??


Richard Dobson




Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa23399;
          21 Feb 98 14:55 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa01504;
          21 Feb 98 14:55 GMT
Received: (qmail 7557 invoked from network); 21 Feb 1998 14:55:27 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 21 Feb 1998 14:55:27 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (OAA15192); Sat, 21 Feb 1998 14:50:15 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sat, 21 Feb 98 14:49:56 GMT
Received: from howl.werewolf.net [206.103.224.20] by hermes via SMTP (OAA22748); Sat, 21 Feb 1998 14:49:49 GMT
Received: from @werewolf.net by howl.werewolf.net via SMTP (950413.SGI.8.6.12/940406.SGI)
	 id IAA05757; Sat, 21 Feb 1998 08:49:23 -0600
Message-Id: <3.0.3.16.19980220191958.335f886a@werewolf.net>
X-Sender: hljmm@werewolf.net
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.3 (16)
Date: Fri, 20 Feb 1998 19:19:58
To: Pedro Batista , csound@maths.ex.ac.uk
From: Hans Mikelson 
Subject: Re: introduction and few questions
In-Reply-To: <0887901637/0118146402/1*@mailpac.pt>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

At 03:20 PM 2/19/98 GMT, Pedro Batista wrote:

>One thing I cant seem to understand from the help file, is the midi 
>integration with csound. Can someone briefly explain exactly what can I do 
>with midi and csound, and how does the comunication between one and the 
>other happens?

I have only limited experience with this.  Check rotormid.orc and
rotormid.sco  on my web page 

http://www.werewolf.net/~hljmm/csound/

which is used with rotormid.mid midi file.  It reads the file and generates
audio from it.  It is very basic.  There are some other examples on the
bath site.

>Also, I've been studying Risset's aproach on drum sounds. Are there other 
>aproaches to drum design (namely snares), maybe using the pluck opcode 
>methods 3,4? An example would be welcome

Try my drum machine on my web page for some wacky drum sounds.  I think I
might have a pluck snare example.  For simulating analog drum machine
sounds try:

http://www.netkonect.co.uk/a/analogue

Bye,
Hans Mikelson





Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa23580;
          21 Feb 98 17:17 GMT
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa04904;
          21 Feb 98 17:17 GMT
Received: (qmail 13230 invoked from network); 21 Feb 1998 17:17:31 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 21 Feb 1998 17:17:31 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (RAA01826); Sat, 21 Feb 1998 17:14:38 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sat, 21 Feb 98 17:14:21 GMT
Received: from root@[194.184.60.149] by hermes via ESMTP (RAA02346); Sat, 21 Feb 1998 17:14:03 GMT
Received: (from nicb@localhost)
	by ax-nicb.axnet.it (8.8.8/8.8.8) id SAA23297;
	Sat, 21 Feb 1998 18:08:13 +0100
Date: Sat, 21 Feb 1998 18:08:12 +0100 (MET)
From: Nicola Bernardini 
To: Csound mailing list 
Subject: Re: [Csound parser, monsters, dlls]
In-Reply-To: <34EED60E.8FE9E83B@cableinet.co.uk>
Message-Id: 
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

On Sat, 21 Feb 1998, Richard Dobson wrote:

> Sorry, another long post:

oh, well, here comes another one...

> 
> Nicola Bernardini wrote:
> 
> > [snip]
> >
> > 2) dynamic linking: the purpose I meant was exactely NOT to create
> >    a monster: a small application which would load the library it
[snip]

> 1. The use of a dll increases the load time. I have not yet done any
> structured benchmark tests with homemade dlls, but I suspect that loading a
> dll for each opcode will be VERY inefficient. An explicit loadLibrary()

Yes, this is certainly true. But let's look at it this way: it'll take
longer to load, which I think could mostly happen at compile time of
the orchestra (that's when csound knows what to load, is'nt it), then
at performance time it's going to be exactely the same... Right now
I am running a dynamically linked csound on different linux boxes,
from a Pentium 75 laptop to a 166 MMX. I have a statically linked one
for debugging and I cannot ever feel the difference... It's probably
true that dlopen calls are going to be slower, but IMHO they are going
to slow down the beginning process and not the real-time run. How big
should they be? Well, as Richard says, they could be grouped logically
or by successive upgrades or even, why not? by developer (Fitch's dll,
Smargiadis' dll, Maldonado's dll, etc.). So each one can decide how to
code her/his opcodes, etc.

[snip]
> 2. They require a more consistent structuring of the Csound code, eliminating
> globals and statics as much as possible (going to C++ would achieve much of
> this almost automatically), and more structured error handling - we cannot
> have a function in a dll doing a hard exit, or trying to call printf(). If all
> errors and messages are propagated back to the high-level framework functions,
> the same dlls can be used in either commandline or GUI environments. Many of
> the globals and statics currently in the code seem to have arisen because of
> the way Csound has been developed, incrementally, and existing functions  are
> not provided with enough parameters for newer facilities.

I think that certainly more consistent structuring of the Csound code
with elimination of globals and statics (why statics? they are quite
fine in my opinion) would be a nice thing to do, but *that* is a major
rewrite task and I would not insist on that. Furthermore, I don't see the
connection with dynamic linking: the libraries can always refer to
globals and global resouces, is'nt it? Rather, I would concentrate on
another problem: where do the GEN routines go? Should they be grouped
logically? (Boh...)

[snip]
> In short, making Csound dll-ready is a major task, with more than one
> reasonable strategy available, probably none of which solves all problems. An
> important early task (as I think someone has already suggested to the list -
> sorry, I forget who!) is to build a comprehensive  analysis of the whole
> Csound call tree. Visual C++ does at least provide some fundamental tools to
> do this, as it can display function call trees both upwards and downwards,
> from any point. If someone has a suitably powerful code analyser, perhaps they
> might like to do this??

well, as soon as I can I'll try to show that dynamic loading could be
done in a very very progressive way, a small step at a time. Concerning
a code analyser, being an old unix fart the best I can think of is a nice
run which 'ctrace'. There are two problems: 1) we should do many runs with
very different orcs and scores to really understand some statistic path
of the code; 2) to the best of my knowledge, there is no public domain
'ctrace' (if somebody knows of such an item please let me know - I am
*very* interested).

Nicola

------------------------------------------------------------------------
Nicola Bernardini
E-mail: nicb@axnet.it
 
Re graphics: A picture is worth 10K words -- but only those to describe
the picture.  Hardly any sets of 10K words can be adequately described
with pictures.




Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa23741;
          21 Feb 98 18:37 GMT
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa06803;
          21 Feb 98 18:37 GMT
Received: (qmail 16480 invoked from network); 21 Feb 1998 18:37:20 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 21 Feb 1998 18:37:20 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (SAA21727); Sat, 21 Feb 1998 18:33:52 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sat, 21 Feb 98 18:33:25 GMT
Received: from [193.121.99.70] by hermes via ESMTP (SAA20664); Sat, 21 Feb 1998 18:33:18 GMT
Received: from nobody ([193.74.7.129]) by hurricane.netgate.be
          (post.office MTA v2.0 0813 ID# 0-32575U60) with ESMTP id AAA301
          for ; Sat, 21 Feb 1998 19:37:00 +0100
From: David Schuyeteneer 
To: csound mailing list 
Subject: [perception] SOUND vs IMAGES
Date: Sat, 21 Feb 1998 19:32:34 +0100
X-Msmail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Message-Id: <19980221183658939.AAA301@nobody>
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Having a chillout afternoon from the technoparty last night, my mind
started wandering on different
thoughts....All of a sudden I came across the question what the absolute,
essential difference is
between sonic perceptions and visual perceptions...

I landed on this because I was thinking about my last visit to the Louvre
museum in Paris last summer....
I was contemplating paintings there, and I remember that the huge
dimensions (like 8x6 meters ! )
of some canvases were something that is rarely experienced in music :  the
simultaneousity of a 
visual surface....some primitive results of my chaotic mind :

    VISUAL                          SONIC
   --------------                       -------------

   - simultane      TIME         - serial


   - static           SPACE      - dynamic
 


David.




Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa23787;
          21 Feb 98 18:51 GMT
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa07184;
          21 Feb 98 18:51 GMT
Received: (qmail 17007 invoked from network); 21 Feb 1998 18:51:54 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 21 Feb 1998 18:51:54 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (SAA06152); Sat, 21 Feb 1998 18:49:18 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sat, 21 Feb 98 18:51:00 GMT
Received: from agora.stm.it [195.62.32.1] by hermes via ESMTP (SAA27568); Sat, 21 Feb 1998 18:48:54 GMT
Received: from default (ppp02-09.stm.it [195.62.37.73]) by agora.stm.it (8.8.8/8.8.5) with ESMTP id TAA05168; Sat, 21 Feb 1998 19:48:41 +0100 (ITA)
Message-Id: <34EF2269.C048ACDE@agora.stm.it>
Date: Sat, 21 Feb 1998 19:52:26 +0100
From: Gabriel Maldonado 
X-Mailer: Mozilla 4.0 [en] (Win95; I)
Mime-Version: 1.0
To: Pedro Batista 
Cc: csound@maths.ex.ac.uk
Subject: Re: take two
X-Priority: 3 (Normal)
References: <0887979084/1444804828/1*@mailpac.pt>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Check my version of Csound: in the executable zip archive there are
several examples which use realtime midi. You can find it at the
followinf URL:

http://www.agora.stm.it/G.Maldonado/download.htm




Pedro Batista wrote:

> >I think it's time for me to show some gratitude towards all of who
> >answerred my endless stream of
> >questions...The manual only isn't enough, this list, source of
> information
> >is really a good thing, I could
> >not get started with Csound without it, really....There's no advice
> better
> >than advice from someone who
> >allready coped with the same problem.
>
> I dont wanna sound ungrateful, impacient or something, but either my
> query
> was too "unprofessional" or beginers arent much apreciated here
> I'm really determined to use csound material in my productions (mainly
> as
> sample source), and theres nothing you can do about it. I was
> expecting some
> help from this list, but I guess I'll have to learn a lot more, prior
> to
> someone actually listening to my problems
> I realise there is a number of highly educated persons here, who
> probably
> dont have enough time in their hands as it is, to waste even more
> teaching
> newbies the first steps, but at least some directions and sugestions
> for
> further study would be apreciated (the manual surely aint enough).
> But I'm hardly giving up. I'll just keep listening and happily banging
> my
> head against the wall till I get it
>
> pedro



--
Gabriel Maldonado

http://www.agora.stm.it/G.Maldonado/home2.htm





Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa24046;
          21 Feb 98 21:39 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa11219;
          21 Feb 98 21:38 GMT
Received: (qmail 9060 invoked from network); 21 Feb 1998 21:39:01 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 21 Feb 1998 21:39:01 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (VAA25909); Sat, 21 Feb 1998 21:33:40 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sat, 21 Feb 98 21:33:24 GMT
Received: from alcor.imaginet.fr [194.51.83.171] by hermes via ESMTP (VAA02551); Sat, 21 Feb 1998 21:33:17 GMT
Received: from imaginet.fr (zoltar.imaginet.fr [194.51.83.150])
	by relay-smtp.imaginet.net (8.8.8/8.8.8) with ESMTP id WAA29552
	for ; Sat, 21 Feb 1998 22:30:18 +0100 (MET)
Received: from cyber52-2.paris.imaginet.fr (cyber52-2.paris.imaginet.fr [195.68.2.52]) by imaginet.fr (8.7.5/8.7.31) with SMTP id WAA28703 for ; Sat, 21 Feb 1998 22:33:49 +0100 (MET)
To: CSOUND-LIST 
Subject: Cecilia for Mac
From: Araoz 
Date: Sat, 21 Feb 1998 22:37:37 +0100
Message-Id: <1998022122373757982@cyber52-2.paris.imaginet.fr>
Organization: imaginet
X-Mailer: MacSOUP F2.2
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Anyone know if Cecilia is available for Mac?
Where could I found it ?
Thanks
-- 
Laura et Ricardo NILLNI
nillni@mail3.imaginet.fr  
rnillni@usa.net
http://www.imaginet.fr/~nillni



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa24146;
          21 Feb 98 23:07 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa13406;
          21 Feb 98 23:07 GMT
Received: (qmail 9390 invoked from network); 21 Feb 1998 23:07:38 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 21 Feb 1998 23:07:38 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (XAA14863); Sat, 21 Feb 1998 23:02:09 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sat, 21 Feb 98 23:01:50 GMT
Received: from condor.CC.UMontreal.CA [132.204.2.103] by hermes via ESMTP (XAA22102); Sat, 21 Feb 1998 23:01:41 GMT
Received: from eole.ERE.UMontreal.CA (eole.ERE.UMontreal.CA [132.204.2.70]) by condor.CC.Umontreal.CA with ESMTP id SAA06606
  (8.6.11/IDA-1.6); Sat, 21 Feb 1998 18:01:51 -0500
Received: from mistral.ERE.UMontreal.CA (mistral.ERE.UMontreal.CA [132.204.2.73])
	by eole.ERE.UMontreal.CA (8.8.7/8.8.7) with ESMTP id SAA29087;
	Sat, 21 Feb 1998 18:01:41 -0500 (EST)
Received: (from burtona@localhost)
	by mistral.ERE.UMontreal.CA (8.8.7/8.8.7) id SAA28229;
	Sat, 21 Feb 1998 18:01:39 -0500 (EST)
Date: Sat, 21 Feb 1998 18:01:37 -0500 (EST)
From: Burton Alexandre 
Subject: Re: Cecilia for Mac
To: Araoz 
Cc: CSOUND-LIST 
In-Reply-To: <1998022122373757982@cyber52-2.paris.imaginet.fr>
Message-Id: 
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk


> Anyone know if Cecilia is available for Mac?
> Where could I found it ?
> Thanks

 Cecilia for MacOS, IRIX and Linux is available at 

	ftp://www.musique.umontreal.ca/pub

 but i strongly recommend waiting a few days for the release of version 
1.8, which brings lots of new things, including support for 3.47 and 
better installers for all platforms.

 An announce will be posted on the csound list when it is available, 
hopefully very soon!


						Alex.



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa24162;
          21 Feb 98 23:18 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa13650;
          21 Feb 98 23:18 GMT
Received: (qmail 9439 invoked from network); 21 Feb 1998 23:18:47 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 21 Feb 1998 23:18:47 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (XAA02467); Sat, 21 Feb 1998 23:13:50 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sat, 21 Feb 98 23:13:33 GMT
Received: from mail.infohouse.com [206.30.88.4] by hermes via ESMTP (XAA23453); Sat, 21 Feb 1998 23:13:27 GMT
Received: from [206.30.88.178] by milhouse.infohouse.com
          (Post.Office MTA v3.1 release PO205e ID# 141-39833U2500L250S0)
          with ESMTP id AAA66 for ;
          Sat, 21 Feb 1998 18:12:57 -0500
X-Sender: ic11748@mail.infohouse.com
Message-Id: 
Mime-Version: 1.0
Content-Type: text/enriched; charset="us-ascii"
To: 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: Cecilia for Mac
Date: Sat, 21 Feb 1998 18:12:57 -0500
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk





To: nillni@zoltar.imaginet.fr (Araoz)

From: tolve <

Subject: Re: Cecilia for Mac

Cc: 

Bcc: 

X-Attachments: 


Laura et Ricardo NILLNI wrote:

>Anyone know if Cecilia is available for Mac?

>Where could I found it ?

>Thanks


yes and it is here looking like the be all and end all...

ftp://ftp.musique.umontreal.ca/pub/

but:

believe Cecilia 1.8b15 is the most recent. requires csound 3.47. what i
have is csound perf3.47 with csound 0.3.4b3 downloaded at mills...

ftp://mills.edu/ccm/csound.ppc/


and i have not been able to run cecilia on ppc mac with the above.

a recent post by Dave Madole at Mills stated that they were working on
it.


now there is also an older csound for mac v3.471 on

ftp://ftp.maths.bath.ac.uk/pub/dream/platforms/mac/PCCsound.hqx

although i was unable to run this, it might work for you.


but perhaps our benefactors will step in here to further enlighten us.
Dave, Matt, Jean? am i even running the correct versions of csound? i
would be happy to provide details of my difficulties opening cecilia if
it would be of help to all parties concerned. otherwise i will wait
patiently by my modem for the next cecilia update.


yours,

tolve









Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa24584;
          22 Feb 98 3:43 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa24429;
          22 Feb 98 3:42 GMT
Received: (qmail 10401 invoked from network); 22 Feb 1998 03:43:02 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 22 Feb 1998 03:43:02 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (DAA10060); Sun, 22 Feb 1998 03:37:33 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 22 Feb 98 03:37:06 GMT
Received: from send1d.yahoomail.com [205.180.60.48] by hermes via SMTP (DAA07733); Sun, 22 Feb 1998 03:36:57 GMT
Message-Id: <19980222033358.28040.rocketmail@send1d.yahoomail.com>
Received: from [210.72.69.143] by send1d; Sat, 21 Feb 1998 19:33:58 PST
Date: Sat, 21 Feb 1998 19:33:58 -0800 (PST)
From: Qian Chen 
Subject: question on delay 
To: Csound 
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hi,

Could someone explain me how delayr, delayw, deltap, deltapi work. 
Since I cannot find any books about it, I even do not know how to draw
a flow chart when I read some instrument design using algorithm
mentioned above.  For example, the instrument below(It is downloaded
from
_ftp.maths.bath.ac.uk/pub/dream/documentation/orchestras+scores/instruments/pinkston.1/delay.orc_):

        sr      =       44100
        kr      =       4410
        ksmps   =       10
        nchnls  =       1
;==========================================================================;
;               Example Delay Line Instrument                         
    ;
;                                                                     
    ;
;       p4 = ampfac     p5 = soundin#   p6 = maxdel     p7 = basedel  
    ;
;       p8 = pkvardel   p9 = vardelhz  p10 = vardelfn  p11 = feedfac  
    ;
;==========================================================================;

                instr   1

        iampfac =       (p4 == 0 ? 1 : p4)
        imaxdel =       p6
        ibase   =       p7
        ivary   =       p8
        ivarhz  =       p9
        ivarfn  =       p10
        ifeed   =       p11
        isrcfac =       (p12 == 0 ? 1 : p12)
        idelfac =       (p13 == 0 ? 1 : p13)

        avarsig init    0
	avardel oscili  ivary,ivarhz,ivarfn
	avardel =       ibase+avardel
        asource soundin p5
        ainsig  =       asource+avarsig*ifeed
	adelsig delayr  imaxdel
	avarsig deltapi avardel
		delayw  ainsig
	aoutsig =       asource*isrcfac+avarsig*idelfac
		out     aoutsig*iampfac
		endin

Thanks & Regards
==
Qian Chen

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com




Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa24834;
          22 Feb 98 6:35 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa29080;
          22 Feb 98 6:34 GMT
Received: (qmail 10956 invoked from network); 22 Feb 1998 06:35:02 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 22 Feb 1998 06:35:02 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (GAA21430); Sun, 22 Feb 1998 06:28:29 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 22 Feb 98 06:23:48 GMT
Received: from endeavor.flash.net [209.30.0.40] by hermes via ESMTP (GAA18682); Sun, 22 Feb 1998 06:23:20 GMT
Received: from flash.net (fwasc21-36.flash.net [209.30.56.36])
	by endeavor.flash.net (8.8.7/8.8.5) with ESMTP id AAA08418;
	Sun, 22 Feb 1998 00:23:20 -0600 (CST)
Message-Id: <34EFC49E.7C07873A@flash.net>
Date: Sun, 22 Feb 1998 00:24:31 -0600
From: pete moss 
Organization: pete moss GmbH
X-Mailer: Mozilla 4.04 [en] (Win95; I)
Mime-Version: 1.0
To: David Schuyeteneer 
Cc: csound mailing list 
Subject: Re: Mathematics for sound.
References: <19980221130226427.AAD184@nobody>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

i would say that as a general rule, it is good to know as much as possible
about anything.
but even a little knowledege is better than none.  as far as math goes i have
had several years of calculus and differential equations, from high school
through college.  but the majority of math that i use in computer music
revolves around basic algebra.  i havent yet had a reason to use partial
differential equations that i know of yet, but if i encounter such a
situation i will probably be better prepared.  as far as theory goes, i am a
senior undergraduate in music theory/composition, so i know quite a bit about
theory.  so far with csound, i have used my theory/comp skills more than my
math skills.  the math is however important to me because it helps me
visualize what is going on inside various ugs.
one doesnt necessarily need to know what one is doing for their work. (look
at congress for example)  twiddling knobs can be very effective even if you
dont know what the knobs are actually doing.  in fact some of my greatest
sounds have been produced when things reacted differently than expected.
i guess what i learned as a boy scout pays off:  be prepared.  i dont always
use every tool at my disposal (math, theory, screwdriver, etc), but it is
nice to have them if i need them.

pete

ps - as far as online math teaching, forget it.  go out to your local book
store/university and get a good book on calculus, harmony, etc.  also buy
plenty of paper and pencils (and a pencil sharpener).  a good book has tons
more information and would probably be cheaper.  plus it allows you to learn
away from the computer, which in my opinion is better most of the time.


David Schuyeteneer wrote:

> What types of maths does the regular, graduated computer musician masters
> ??
> Calculus ?? Algebra ??
> What maths are useful for sound/music ?
>
> Are there any good teaching packages for PC available ? online perhaps ?
>
> Also, what basic MUSIC theory does a computer musician needs to know....I
> can imagine that
> it is not absolutely necessary to graduate an extended music-notation
> program to use Csound,
> but I also can imagine that at least a BASIC knowledge might be very
> useful...(which notes sound
> harmonic together, wich not...etc....)
>
> David.






Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa24841;
          22 Feb 98 6:36 GMT
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa29166;
          22 Feb 98 6:36 GMT
Received: (qmail 2184 invoked from network); 22 Feb 1998 06:36:24 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 22 Feb 1998 06:36:24 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (GAA10072); Sun, 22 Feb 1998 06:30:07 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 22 Feb 98 06:29:34 GMT
Received: from endeavor.flash.net [209.30.0.40] by hermes via ESMTP (GAA10535); Sun, 22 Feb 1998 06:29:27 GMT
Received: from flash.net (fwasc21-36.flash.net [209.30.56.36])
	by endeavor.flash.net (8.8.7/8.8.5) with ESMTP id AAA09309
	for ; Sun, 22 Feb 1998 00:29:35 -0600 (CST)
Message-Id: <34EFC616.FAC408AF@flash.net>
Date: Sun, 22 Feb 1998 00:30:46 -0600
From: pete moss 
Organization: pete moss GmbH
X-Mailer: Mozilla 4.04 [en] (Win95; I)
Mime-Version: 1.0
To: csound 
Subject: dsp books?
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 possibly write an n-th order butterworth filter for
csound but i know nothing about the algorithm.  does anyone out there
know of a good dsp book that is chock full of good algorithms to use.
my university library has a huge selection, and i just know which are
better.  in order to avoid sitting on the cold stone floor of the
library tomorrow flipping through book after book, i thought it would be
nice to have something in mind.  any suggestions?

pete




Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa24902;
          22 Feb 98 6:55 GMT
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa29725;
          22 Feb 98 6:55 GMT
Received: (qmail 2434 invoked from network); 22 Feb 1998 06:55:53 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 22 Feb 1998 06:55:53 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (GAA14407); Sun, 22 Feb 1998 06:49:40 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 22 Feb 98 06:49:20 GMT
Received: from root@xochi.tezcat.com [204.128.247.12] by hermes via ESMTP (GAA06206); Sun, 22 Feb 1998 06:49:14 GMT
Received: from [204.248.80.120] (antiorp.tezcat.com [204.248.80.120])
	by xochi.tezcat.com (8.8.5/8.8.5/tezcat-96091001) with SMTP id AAA29503
	for ; Sun, 22 Feb 1998 00:49:22 -0600 (CST)
Message-Id: <199802220649.AAA29503@xochi.tezcat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Date: Sun, 22 Feb 1998 00:54:11 -0600
To: csound mailing list 
From: =cw4t7abs 
Subject: Re: sound.4.Mathematics
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

> in fact some of my greatest
>sounds have been produced when things reacted differently than expected.

>i guess what i learned as a boy scout pays off:  be prepared.

2 _?
b surpr!zed. odr _?
algebra _+ kalkuluz _+ all sekuent!al matter =3D po!ntlesz at d!sz po!nt !n =
time.


>i dont always
>use every tool at my disposal (math, theory, screwdriver, etc), but it is
>nice to have them if i need them.
>
>pete
>
>ps - as far as online math teaching, forget it.

online [math] learn!ng =3D super.
_+ 2 forget !t =3D super++














[p-un_kT-pr_o-T=96k_oL] =D8 f =D8 =D8 =D8 3
-http://www.tezcat.com/~antiorp
_||- p!ano[koncErt4||4]handz.
anTi_s!g-naTure_kampa!gn.10-62.kode_1





Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa25103;
          22 Feb 98 10:05 GMT
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa05611;
          22 Feb 98 10:05 GMT
Received: (qmail 11648 invoked from network); 22 Feb 1998 10:05:46 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 22 Feb 1998 10:05:46 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (KAA22817); Sun, 22 Feb 1998 10:00:11 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 22 Feb 98 09:59:37 GMT
Received: from agora.stm.it [195.62.32.1] by hermes via ESMTP (JAA03260); Sun, 22 Feb 1998 09:59:25 GMT
Received: from default (ppp03-09.stm.it [195.62.37.137]) by agora.stm.it (8.8.8/8.8.5) with ESMTP id KAA29403 for ; Sun, 22 Feb 1998 10:59:23 +0100 (ITA)
Message-Id: <34EFEEF4.BB37FB9B@agora.stm.it>
Date: Sun, 22 Feb 1998 10:25:09 +0100
From: Gabriel Maldonado 
X-Mailer: Mozilla 4.0 [en] (Win95; I)
Mime-Version: 1.0
To: Csound Mailing List 
Subject: Re: [Csound parser, monsters, dlls]
X-Priority: 3 (Normal)
References:  <34EED60E.8FE9E83B@cableinet.co.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Richard Dobson wrote:

> 1. The use of a dll increases the load time. I have not yet done any
> structured benchmark tests with homemade dlls, but I suspect that
> loading a
> dll for each opcode will be VERY inefficient.

The Gogins' DLL routine (implemented in RTsound) is not so inefficient:
it convert OENTRY structure from static to dinamic and loads all opcodes
of a library at the initial stage of a Csound session and allows "an
arbitrary number of libraries, each containing an arbitrary number of
opcodes, which can be loaded at run time without Csound having to know
anything about them in advance and without ever having to relink Csound
itself".

So one can use dozens of  DLLs which are automatically loaded at Csound
startup phase. If anyone is not interested to some opcodes, he can
simply remove the relative DLL from the csound directory, saving initial
loading time and memory.

The realtime peformances of Csound are not minimally reduced in any
case, because the DLL opcodes keep the same architecture of internal
opcodes.

Gogins also suggest to implemet a DLL routine also to support GEN
tables.

--
Gabriel Maldonado

http://www.agora.stm.it/G.Maldonado/home2.htm







Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa25109;
          22 Feb 98 10:05 GMT
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa05623;
          22 Feb 98 10:05 GMT
Received: (qmail 4894 invoked from network); 22 Feb 1998 10:05:55 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 22 Feb 1998 10:05:55 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (KAA14675); Sun, 22 Feb 1998 10:00:14 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 22 Feb 98 09:59:35 GMT
Received: from agora.stm.it [195.62.32.1] by hermes via ESMTP (JAA07754); Sun, 22 Feb 1998 09:59:25 GMT
Received: from default (ppp03-09.stm.it [195.62.37.137]) by agora.stm.it (8.8.8/8.8.5) with ESMTP id KAA29391; Sun, 22 Feb 1998 10:59:19 +0100 (ITA)
Message-Id: <34EFEB13.DCF34586@agora.stm.it>
Date: Sun, 22 Feb 1998 10:08:35 +0100
From: Gabriel Maldonado 
X-Mailer: Mozilla 4.0 [en] (Win95; I)
Mime-Version: 1.0
To: Nicola Bernardini 
Cc: Csound mailing list 
Subject: Re: [Csound parser, monsters, dlls]
X-Priority: 3 (Normal)
References: 
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Nicola Bernardini wrote:

>  Concerning
> a code analyser, being an old unix fart the best I can think of is a
> nice
> run which 'ctrace'. There are two problems: 1) we should do many runs
> with
> very different orcs and scores to really understand some statistic
> path
> of the code; 2) to the best of my knowledge, there is no public domain
>
> 'ctrace' (if somebody knows of such an item please let me know - I am
> *very* interested).

What are code analysers and ctrace?

--
Gabriel Maldonado

http://www.agora.stm.it/G.Maldonado/home2.htm







Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa25141;
          22 Feb 98 10:18 GMT
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa05935;
          22 Feb 98 10:18 GMT
Received: (qmail 5122 invoked from network); 22 Feb 1998 10:18:55 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 22 Feb 1998 10:18:55 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (KAA26178); Sun, 22 Feb 1998 10:13:51 GMT
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 22 Feb 98 10:13:01 GMT
Received: from f95.hotmail.com [207.82.250.201] by hermes via SMTP (KAA26650); Sun, 22 Feb 1998 10:12:52 GMT
Received: (qmail 23777 invoked by uid 0); 22 Feb 1998 10:12:19 -0000
Message-Id: <19980222101219.23776.qmail@hotmail.com>
Received: from 207.172.192.7 by www.hotmail.com with HTTP;
	Sun, 22 Feb 1998 02:12:19 PST
X-Originating-Ip: [207.172.192.7]
From: Paul Winkler 
To: csound@maths.ex.ac.uk
Subject: List archive is broken?
Content-Type: text/plain
Date: Sun, 22 Feb 1998 02:12:19 PST
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

I have some questions I know have been answered in the past, so I went 
to check the archives and found it impossible to find my way around in 
there. There seems to be no correspondence between the article you 
select and the article that comes up. There are also many "not found" 
errors. I tried back later and had the same problems. Is this happening 
for everyone? If so I would implore whoever is responsible for that site 
to fix it ASAP! Or else I will be forced to ask everyone how to 
correctly use gen 01! :)

Regards,

PW

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

Date1998-02-21 17:08
FromNicola Bernardini
SubjectRe: [Csound parser, monsters, dlls]
On Sat, 21 Feb 1998, Richard Dobson wrote:

> Sorry, another long post:

oh, well, here comes another one...

> 
> Nicola Bernardini wrote:
> 
> > [snip]
> >
> > 2) dynamic linking: the purpose I meant was exactely NOT to create
> >    a monster: a small application which would load the library it
[snip]

> 1. The use of a dll increases the load time. I have not yet done any
> structured benchmark tests with homemade dlls, but I suspect that loading a
> dll for each opcode will be VERY inefficient. An explicit loadLibrary()

Yes, this is certainly true. But let's look at it this way: it'll take
longer to load, which I think could mostly happen at compile time of
the orchestra (that's when csound knows what to load, is'nt it), then
at performance time it's going to be exactely the same... Right now
I am running a dynamically linked csound on different linux boxes,
from a Pentium 75 laptop to a 166 MMX. I have a statically linked one
for debugging and I cannot ever feel the difference... It's probably
true that dlopen calls are going to be slower, but IMHO they are going
to slow down the beginning process and not the real-time run. How big
should they be? Well, as Richard says, they could be grouped logically
or by successive upgrades or even, why not? by developer (Fitch's dll,
Smargiadis' dll, Maldonado's dll, etc.). So each one can decide how to
code her/his opcodes, etc.

[snip]
> 2. They require a more consistent structuring of the Csound code, eliminating
> globals and statics as much as possible (going to C++ would achieve much of
> this almost automatically), and more structured error handling - we cannot
> have a function in a dll doing a hard exit, or trying to call printf(). If all
> errors and messages are propagated back to the high-level framework functions,
> the same dlls can be used in either commandline or GUI environments. Many of
> the globals and statics currently in the code seem to have arisen because of
> the way Csound has been developed, incrementally, and existing functions  are
> not provided with enough parameters for newer facilities.

I think that certainly more consistent structuring of the Csound code
with elimination of globals and statics (why statics? they are quite
fine in my opinion) would be a nice thing to do, but *that* is a major
rewrite task and I would not insist on that. Furthermore, I don't see the
connection with dynamic linking: the libraries can always refer to
globals and global resouces, is'nt it? Rather, I would concentrate on
another problem: where do the GEN routines go? Should they be grouped
logically? (Boh...)

[snip]
> In short, making Csound dll-ready is a major task, with more than one
> reasonable strategy available, probably none of which solves all problems. An
> important early task (as I think someone has already suggested to the list -
> sorry, I forget who!) is to build a comprehensive  analysis of the whole
> Csound call tree. Visual C++ does at least provide some fundamental tools to
> do this, as it can display function call trees both upwards and downwards,
> from any point. If someone has a suitably powerful code analyser, perhaps they
> might like to do this??

well, as soon as I can I'll try to show that dynamic loading could be
done in a very very progressive way, a small step at a time. Concerning
a code analyser, being an old unix fart the best I can think of is a nice
run which 'ctrace'. There are two problems: 1) we should do many runs with
very different orcs and scores to really understand some statistic path
of the code; 2) to the best of my knowledge, there is no public domain
'ctrace' (if somebody knows of such an item please let me know - I am
*very* interested).

Nicola

------------------------------------------------------------------------
Nicola Bernardini
E-mail: nicb@axnet.it
 
Re graphics: A picture is worth 10K words -- but only those to describe
the picture.  Hardly any sets of 10K words can be adequately described
with pictures.