[Pythonsound-devel] Re: Python and music [was Re: New work, new tools] (fwd)
Status: Beta
Brought to you by:
mupuxeddu
From: Paul W. <sli...@ya...> - 2001-10-03 20:20:51
|
On Wed, Oct 03, 2001 at 03:52:40PM +0200, Maurizio Umberto Puxeddu wrote: > On Mon, 1 Oct 2001, Paul Winkler wrote: > > I also like the operator overloads I'm using, but that's really just > > sugar. > > > > If you're agreeable to supporting features like .append(), .merge(), > > .extend() and maybe some operator shortcuts for them, I may consider > > dropping pysco entirely and putting my work into OMDE. > > No problem. It can can be done. OK. I will take on the project of going through OMDE and trying to see if / how it can support my ideas. I'd still like to discuss whether objects should be responsible for their own start time, or delegate that to a parent Aggregate. When you get a chance, I'd like to hear your reasoning for making each event responsible for its own start time. The only argument I can see *against* giving this responsibility to the parent (the containing Aggregate) is that it requires you to have a top-level Aggregate to control your composition's overall structure. This might be seen as inconvenient; "I know when this object should start, I want to say so when I create the object." But I think it's actually an advantage to have an explicit top-level Aggregate, because it's easier to see the overall structure of the piece that way. And suppose you want to have two Aggregates which consist of the same events in different order. Let's call the contained events A, B, and C. If each object is responsible for their own start time, that would look something vaguely like this: A = Event(start = 1) B = Event(start = 2) C = Event(start = 3) Agg1 = Aggregate(A, B, C) A2 = copy(A); A2.set_start_time(10) B2 = copy(B); B2.set_start_time(20) C2 = copy(C); C2.set_start_time(0) Agg2 = Aggregate(A2, B2, C2) I have to make copies or else I'll change Agg1 when I only want to change Agg2. On the other hand, if we use the Aggregate to control start time, it's a lot easier. Something like this: A = Event() B = Event() C = Event() Agg1 = Aggregate((1, A), (2, B), (3, C)) Agg2 = Aggregate((10, A), (20, B), (30, C)) As further purely anecdotal evidence, I'll note that the author of Blue does it my way. :) Implementation detail: In pysco, I have been storing the events within an Aggregate (I call them Blobs) as a simple list of [start_time, event] lists. I chose that because it makes it easy to e.g. sort the list by start time. And I use lists rather than tuples so it's easy to replace any event or change any start time. > I need to keep concentrate on my compositions for some time and I'll not > reply very quickly to emails for few days. That's fine - I have plenty of work to do, and I've been working on pysco for almost two years anyway, so you can see I'm in no hurry. :) Anyway, as I found with pysco, trying to compose with it is the best way to improve it - "eat your own dog food" as they say. > I also would like to move this discussion on the pythonsound-devel > list here: > > http://lists.sourceforge.net/lists/listinfo/pythonsound-devel Done. I think there have been some discussions of pmask on the csound list, but not being subscribed anymore, I can't find them - there don't seem to be archives of the csound list anywhere! Are you on the csound list? If so, and if you have time, could you see if there are any interesting pmask-related messages on csound list and forward them to pythonsound-devel? -- ................ paul winkler ................ custom calendars: http://www.calendargalaxy.com A member of ARMS: http://www.reacharms.com home page: http://www.slinkp.com |