Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:4045] Csound 5 utilities

Date2004-02-07 03:26
From"Michael Gogins"
Subject[CSOUND-DEV:4045] Csound 5 utilities
In the course of making a Makefile.am for Csound 5, I have found that some
(most?) utility programs contain source files that almost, but not quite,
duplicate files in Csound proper.

Unless I hear very strenuous objections indeed, I am going to get rid of all
the duplicate code. One person who is intimately familiar with the code can
safely maintain the two copies of the code, but if more than one person
starts paying very much attention to this code, the duplicate files are
begging for trouble.

What I am going to do is use the code in Csound proper. The main() in the
utility program will simply link with the Csound API library. For example,
in the dnoise main(), dnoise(argc, argv) will be called.

I can see that some of the utility programs will link with all the Csound
API library, and others will not. I am aware that this will make some or all
of the utility programs larger. In my view, this is a small price to pay for
avoiding this set of hacks. Possibly the scheme to have two Csound
libraries, one for Csound hosts and one for utility programs, can be used.

============================================
Michael Gogins
gogins at pipeline period com
Irreducible Productions
CsoundVST, an extended version of Csound for programming music and sound
Available at http://sourceforge.net/projects/csound/
============================================

Date2004-02-07 03:49
FromAnthony Kozar
Subject[CSOUND-DEV:4046] Re: Csound 5 utilities
I'd noticed the same thing when I was trying to get Cscore working again.

Instead of linking with all of Csound, why don't you just pull the duplicate
code out into a separate file and #include it as necessary.  Then there
would be only one copy and minimum bloat too.

Anthony Kozar
anthony.kozar@utoledo.edu


On 2/6/04 10:26 PM, Michael Gogins etched in stone:

> In the course of making a Makefile.am for Csound 5, I have found that some
> (most?) utility programs contain source files that almost, but not quite,
> duplicate files in Csound proper.
> 
> Unless I hear very strenuous objections indeed, I am going to get rid of all
> the duplicate code. One person who is intimately familiar with the code can
> safely maintain the two copies of the code, but if more than one person
> starts paying very much attention to this code, the duplicate files are
> begging for trouble.
> 
> What I am going to do is use the code in Csound proper. The main() in the
> utility program will simply link with the Csound API library. For example,
> in the dnoise main(), dnoise(argc, argv) will be called.
> 
> I can see that some of the utility programs will link with all the Csound
> API library, and others will not. I am aware that this will make some or all
> of the utility programs larger. In my view, this is a small price to pay for
> avoiding this set of hacks. Possibly the scheme to have two Csound
> libraries, one for Csound hosts and one for utility programs, can be used.