From: Larry T. <lt...@we...> - 2003-06-07 00:34:29
|
(Should I subscribe to the devel list? Is this kind of topic better posted there?) I have some thoughts here (which as you people know, is not always a positive thing, of course :-) ), which I hope people don't mind if I spew out. First, as an alternative to Python or Ruby, wouldn't it be nice (and feasible) to run Common Music in an embedded guile? (Or talk to a Common LIsp Common Music through a socket). Then one could take advantage of all the power that is already in Common music: using the item streams to generate events; rendering to Csound, Common Lisp Music, or Common Music Notation; easily converting to/from all these formats and MIDI; other things. An additional advantage would be that Lisp is probably easier to learn than Python or Ruby for someone who is not primarily a programmer (although I recognize that there are people who might feel otherwise for whatever reason, so please let's not start _that_ flame fest - this is just my opinion, and not central to my argument). Second: alternatively, maybe in a round-about way, this really strengthens the argument for a language-neutral scripting architecture (unfortunately I seem to have trashed that message, so I don't remember who mentioned it). I'm guessing that the person meant that you could somehow setup Rosegarden in a way to use any language you wish. If not, then I wonder if the poster could elaborate. Here's a thought (and I have to credit Steven Yi of Blue fame for fostering this idea): Until it gets hashed out how an embedded scripting should work in Rosegarden (or indeed it gets decided that it's not worth shooting for), why not have a simple GUI action that pops up a dialog box where the user can enter a number of generic parameters, then runs a user-specified shell command that is passed the filename of the current XML representation of the Rosegarden session and the values of the parameters, and then writes the new XML out to some other file (or the same one) which Rosegarden then reloads. I haven't fully thought out the details - I'm just trying to convey the concept. To my thinking (and recognizing that my thinking might not be correct, because I haven't been exposed to rg for that long and don't know the internals yet), this might be fairly easy to implement. It could be something that's implemented relatively soon, as a concession to people who like to experiment with such things (hey, that would be me!). In fact if such a thing is approved, I'd be glad to implement myself. I imagine the difficulties would be not so much in the save/shell/reload sequence as having to store such things in the XML as the current selection (most definitely a requirement for a user-defined editing operation!), and the current time markers. The drawback is that the language/app that the user makes to perform this transformation has to be able to understand XML. It also might be desirable to provide a library that such apps use to provide a buffer between the app and the XML file, which means more work for the rg team. So it would be interesting to know what the developers and users think about (1) using a Lisp that loads Common Music as a scripting extension, and (2) Making a simple convenience hook in the GUI to run an external program to manipulate the XML which Rosegarden reloads. Best Regards Larry Troxler |