Csound Csound-dev Csound-tekno Search About

Re: CSound Amiga Version

Date1999-04-20 12:24
Fromjpff@maths.bath.ac.uk
SubjectRe: CSound Amiga Version
Message written at 20 Apr 1999 09:41:07 +0100
--- Copy of mail to pipe@algonet.se ---
In-reply-to:  (message from Anders
	Andersson on Fri, 16 Apr 1999 00:00:34 +0200)
References:  

>>>>> "Anders" == Anders Andersson  writes:

 Anders> I'm very eager to see an official Amiga-dist of CSound in the future,
 Anders> as I now believe I'm capable of handling that project.

Great, as that was a processor missing from the collection

 Anders> But there are some things that I could need a bit help with before I
 Anders> start planning on a clean Amiga dist. I need to write graphic routines
 Anders> for AmigaOS, but I don't really know how CSound calls the different
 Anders> window routines. I have managed to get a whole lot of information
 Anders> by reading /winX11.c/ and /winbor.c/ etc etc, but there are still some
 Anders> things I don't really get..

 Anders> Are there any documentation on how to write graphic routines for CSound,
 Anders> or do I have to look at the different window-handlers that's already
 Anders> implemented?

Documentation no, but I have done a couple of implementations and I
would that it is not really very hard.  You need to write functions
int Graphable(void) /* called during program initialisation */
void MakeGraph(WINDAT *wdptr, char *name) 
	/* called from window.c to open a graphics window */
void DrawGraph(WINDAT *wdptr)    /* called from window.c to graph an array */
void KillGraph(WINDAT *wdptr) /* Destroy a graph */
int ExitGraph(void)           /* stop graphs tptally */

and if you want to do xyin opcode you need the following two; or at
least dummies liek these

void MakeXYin(XYINDAT *wdptr, float x, float y)	/* initial proportions */
{
}

void ReadXYin(XYINDAT *wdptr)
{
}

I suggest that you look at winfg.c and winbor.c as simple cases.

 Anders> I have another problem with the Amiga-version, that has to do with the
 Anders> compiler I currently use /(gcc)/.
 Anders> It seems that the function "/tell()/" isn't imlemented, so all the opcodes
 Anders> that use external samples don't work! =(.

I have removed tell from currect sources as it is not defined in all
systems.  In sysdep.h I have added
# define tell(fd) lseek(fd, 0, SEEK_CUR)
for some platforms at least.  I suggest that you do the same.  If you
want I can send you my current sources

 Anders> Strange thing though.. All the other Level 1 functions are implemented..

 Anders> Are there any major reason to use Level 1 files? Or could they be rewritten
 Anders> to use Level 2 (well, it's ANSI-C).
 Anders> I assume all the file-handling routines are very deep in CSound, and would
 Anders> be a *huge* pain to change, but if it's possible..

I have considered doing this rewrite, so it woudl be closer to real
ANSI, but always shirked away from the disruption.  I think it should
be done, but there are places where an int as a file descriptor is
rather deep, and so converting to a FILE* is a pain.  One could use
the fileno function, but that is not standard either.

 Anders> The last but not least question:
 Anders> Where can I find the absolute latest and recently updated
 Anders> CSound documentation?
 Anders> I've only found the online version, covering CSound V3.47.

In ftp.maths.bath.ac.uk:pub/dream/newest/ you can find both a ZIP and
a gzip-tar file of the 3.53 sources.  You can have 3.54 putative
sources from me.  

I have not decided on a time table for 3.54.  At present it is just
some random changes (drag'n'drop for Windows, optimising soem filters,
better use for linevents, one new opcode, bug fixes in the FM4
instruments, better handling of piped output and some minor changes.
Hardly worth a release yet.

Date1999-04-21 21:51
FromAnders Andersson
SubjectRe: CSound Amiga Version
Hello, and thank you very much for taking time to reply on this mail!!

I'm sending this to the global list, as I think there are others
who could have some interest in this Amiga-port, or that could
be able to help me with some questions.

The work on the amigaversion is still in progress but it's
getting closer and closer! =)



On 20-Apr-99, you wrote:

> and if you want to do xyin opcode you need the following two; or at
> least dummies liek these
> 
> void MakeXYin(XYINDAT *wdptr, float x, float y)    /* initial proportions
*/
> void ReadXYin(XYINDAT *wdptr)

_*Question:*_
What do you mean with /'initial proportions?'/
Is it the aspect ratio of the window, or is it the absolute window size?


> I have removed tell from currect sources as it is not defined in all
> systems.  In sysdep.h I have added
> # define tell(fd) lseek(fd, 0, SEEK_CUR)
> for some platforms at least.  I suggest that you do the same.

Thanks alot! That seemed to work! That is really something i've
missed from the old Amiga-compile.. diskin and soundin didn't work..
But now it does! =)



Now i have a few other questions and remarks.. Here we go! =)


1. What's happened with the function "oload()" from "oload.c"
   used in "musmon.c" since V3.40?  It seems to do nothing for
   about 5-10 seconds now. In V3.40 I didn't even notice the
   time!
   Ofcourse the long wait depends on my *slow* computer (68030/50mhz),
   and that the Amiga is generally slow on memory access.
   but the speed difference between the old and new version is about
   2000%, so something must have happened.
   Could it be that PMAX has increased *A LOT*?
   What did it used to be in V3.40?

2. When displaying a graph, should the program ALWAYS wait for the
   user to click on the window before starting to draw?
   If so, why? I think it's very annoying, but that could be IMHO.

3. Has anyone compiled csound in GCC using "-ffast-math"?
   I have used that for my test versions, and it has worked flawlessly
   on every score i've synthesized.

4. Is there something wrong with the makefile for "anal/adsyn"?
   I can't get it to compile! I get the error message
   "makef:13: *** multiple target patterns.  Stop.".
   I bet this has something to do with my "make" program, but
   if I'm lucky, it's an error in the makefile! =)

5. Are there any documentation for using ".csd" files, or is it
   just Me that's blind?


// Ami-Anders

Date1999-04-22 07:45
FromJens Kilian
SubjectRe: CSound Amiga Version
> > void MakeXYin(XYINDAT *wdptr, float x, float y)    /* initial proportions
> */
> > void ReadXYin(XYINDAT *wdptr)
> 
> _*Question:*_
> What do you mean with /'initial proportions?'/
> Is it the aspect ratio of the window, or is it the absolute window size?

IIRC, the XYin window converts the mouse position to a value in [0,1] x [0,1].
The "initial proportion" determines the starting point. You can choose any
window size you want.

In my implementation (see http://www.bawue.de/~jjk/Csound/Server.html#windows),
I display a crosshair to show the current values.

> 2. When displaying a graph, should the program ALWAYS wait for the
>    user to click on the window before starting to draw?
>    If so, why? I think it's very annoying, but that could be IMHO.

I just draw immediately, but cache graphs so that the user can review a graph
which was replaced too fast. (See above URL.)

> 4. Is there something wrong with the makefile for "anal/adsyn"?
>    I can't get it to compile! I get the error message
>    "makef:13: *** multiple target patterns.  Stop.".
>    I bet this has something to do with my "make" program, but
>    if I'm lucky, it's an error in the makefile! =)

I don't bother with separately compiled utilities at all; I just run everything
via 'csound -U ...'.

HTH,

        Jens.
--
mailto:jjk@acm.org                 phone:+49-7031-14-7698 (HP TELNET 778-7698)
  http://www.bawue.de/~jjk/          fax:+49-7031-14-7351
PGP:       06 04 1C 35 7B DC 1F 26 As the air to a bird, or the sea to a fish,