| The implementation of csd files in AXCsound should be able to do what you
were trying to do. The code in the canonical sources does not skip over tags
until it finds , read tags until it finds
, and then skip all remaining tags, as it really should.
Instead, the canonical sources assume that the very first tag encountered
will be . This prevents the canonical Csound from
rendering a csd file embedded in another HTML or XML file. But, as I said, I
think AXCsound can do this - at least, it is SUPPOSED to do this.
-----Original Message-----
From: owner-csound-outgoing@maths.ex.ac.uk
[mailto:owner-csound-outgoing@maths.ex.ac.uk]On Behalf Of Lars Luthman
Sent: Monday, August 23, 1999 6:25 AM
To: Csound list
Subject: Unified file format
I sent this message yesterday, but I haven't seen it on the list, so here
it is again.
--
I was looking at some Csound compositions in unified file format (.csd),
and I saw that they had start and end tags that looked just like HTML. I
thought, "Cool! Does that mean that I can put a Csound composition in a
HTML file and maybe write some words about the composition, so the same
file can be read as a webpage in my browser and given to Csound for
rendering? That would be very convenient."
I copied a simple CSD file into the body of a HTML file and tried rendering
it with Csound (I changed the file name extension to .csd). It didn't work,
of course (as I would have known if I had read the manual). Perf complained
"Unknown command: " (or something like that, it froze before
finishing the line). Strange, it didn't say anything about "" being
an unknown command, and that line appeared before "". I tried moving
the contents of the CSD file almost to the beginning of the file, between
the "" and the "" tags, and this time it was rendered without
any problems.
Later, when I read the manual, I found out that it actually shouldn't have
worked the second time either, since the first line in a CSD file must be
"" and the last line must be "".
But I still think it would be a great if I could put a Csound composition
in a webpage, and don't have to copy and paste the composition itself to a
new textfile when I want to render it. So I have a suggestion.
Couldn't Csound ignore everything outside the "" tags?
That way a composition could be incorporated in any kind of file (e.g.
HTML, ASCII text, Word or PDF documents). Maybe someone could write a web
browser plugin that played Csound compositions!
What do you think? I'm afraid I don't have the time or the programming
skills to do any of these changes, but I sure would use it if it was done.
--ll
|