Author |
Message |
bachus

Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Sun Sep 11, 2005 1:44 pm Post subject:
Program In Progress |
 |
|
Two recent threads in the composition forum:
How do you write your partiture?
Composition Grammar
Interestingly (or not) I have been working on a heuristics based music composition system that includes several of the features raised in these two posts. Unfortunately after something like 8 months work on the infrastructure I still have at least 8 months of work left just to complete the infrastructure. When completed it would allow the user to create a composition by setting discrete parameters, drawing continuous parameters, and entering motifs—rhythmic, harmonic, melodic etc,. It is a top down system, meaning that (except for motifs) one starts at the highest level of abstraction and works down. Many of the abstractions (parameters) are hierarchical. The attached diagram shows one way in which continuous parameters, in this case RhythmicEnergy might usefully follow hierarchical decomposition. In this example conservation is the method. Here the area under the RhythmicEnergy curve from tn to tm is the same at movement and section level. One could specify such parameters at high levels of abstraction and let the algorithms work out the appropriate variations at lower levels of abstraction.
Though very far from implementing it I am currently working on definitions, i.e. models, of mode (in the broad inclusive sense of pitch class sets) that are amenable to graphic representation. If anyone is interested in perusing that in this forum I would be glad to exchange ideas.
Description: |
|
Filesize: |
36.61 KB |
Viewed: |
18949 Time(s) |

|
_________________ The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham |
|
Back to top
|
|
 |
elektro80
Site Admin

Joined: Mar 25, 2003 Posts: 21959 Location: Norway
Audio files: 14
|
Posted: Sun Sep 11, 2005 2:23 pm Post subject:
|
 |
|
I will follow this development with great interest. Initially, I felt that this might do nothing for me re the way I write music. I tend to think I kinda visualize everything at once.. that doesn´t make any sense.. I know.. but I think I write in a kind of nonlinear everything at once kinda way (.. still doesn´t make any sense). Anyway, your way of thinking might make a lot of sense.. I am still pondering on this. Is this the same thing you sent by email some months ago? _________________ A Charity Pantomime in aid of Paranoid Schizophrenics descended into chaos yesterday when someone shouted, "He's behind you!"
MySpace
SoundCloud
Flickr |
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sun Sep 11, 2005 2:55 pm Post subject:
|
 |
|
Great initiative!
Could you go into a little more detail? How will this link to instruments, for example? Are you planning to use MIDI, OSC or will sound generations be a part of this program too? What platform are you developing this for? _________________ Kassen |
|
Back to top
|
|
 |
bachus

Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Sun Sep 11, 2005 3:52 pm Post subject:
|
 |
|
elektro80 wrote: | Initially, I felt that this might do nothing for me re the way I write music. I tend to think I kinda visualize everything at once.. that doesn´t make any sense.. I know.. but I think I write in a kind of nonlinear everything at once kinda way (.. still doesn´t make any sense). |
Actually, I think it makes perfect sense. And this program is designed to facilitate that very process—at least if I understand you rightly. For me a composition may begin with a few notated fragments-ideas, but before I begin work proper I always develop a complete “schematic” of the work. As work progresses the plan virtually always changes and evolves, sometimes very radically but I still find the plan necessary. The program will work much the same way.
The program (which I’ve named Heuristic Muse ) constructs a composition from a plan that is dynamically built on the fly. This is accomplished through a dynamic goal stack called the Agenda—quite analogous to the execution stack in standard compilers / interpreters. The main difference is that it can be reconfigured on the fly. Say the “Create Composition” goal has pushed movement subgoals onto the stack (above it’s own location) *. The stack would look like this
“Create Movement 1”
“Create Movement 2”
“Create Movement 3”
“Create Composition”
The top goal is always the one to be executed**. A goal is popped from the stack when all its subgoals have been completed. What makes this stack dynamic and differentiates it from program stacks is that it is reconfigureable. Say the “Create Movement 1” goal has pushed a bunch of subgoals on to the stack and one of those subgoals decides it wants to paraphrase material in “Movement 3.” But Movement 3 has yet do any score generation. Movement 1’s subgoal that needs that material can ask the Agenda controller to reconfigure the stack so that work on Movement 3 can progress at least far enough to meet the needs of that subgoal. If the Agenda controller cannot accomplish the reconfiguration it passes that fact back to the requesting subgoal which then must make other plans.
*Prior to pushing the create movement subgoals it would have generated, or obtained from the user, the minimal data needed to accomplish those subgoals, i.e. have created a minimal schematic. Each create movement subgoal would create its own schematic at a slightly lower level of abstraction and so on.
The execution sequence for a goal is.
1 Execute functions not dependent on subgoals including gather/generate data for subgoals.
2 Push subgoals on to stack (through the stack controller).
3 When all subgoals are accomplished execute subgoal dependent functions.
4 Pop from the stack (through the stack controller).
**In terms of the hierarchy this implies a depth first approach but it doesn’t have to work that way.
elektro80 wrote: | Is this the same thing you sent by email some months ago? |
If you mean the screen shot of the score viewer, then yes. I know it seems a strange place to start but it seemed the easiest way to validate and debug the score data structures. And I knew I would be unwilling to try to validate/debug compositional algorithms from text print out. So if I figured that if I couldn’t get through that rather awful grunt work of building a score viewer there was no point in doing anything else. _________________ The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham Last edited by bachus on Sun Sep 11, 2005 4:34 pm; edited 1 time in total |
|
Back to top
|
|
 |
elektro80
Site Admin

Joined: Mar 25, 2003 Posts: 21959 Location: Norway
Audio files: 14
|
Posted: Sun Sep 11, 2005 4:02 pm Post subject:
|
 |
|
Bachus! This is HOT!  _________________ A Charity Pantomime in aid of Paranoid Schizophrenics descended into chaos yesterday when someone shouted, "He's behind you!"
MySpace
SoundCloud
Flickr |
|
Back to top
|
|
 |
bachus

Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Sun Sep 11, 2005 4:26 pm Post subject:
|
 |
|
Kassen wrote: | Could you go into a little more detail? How will this link to instruments, for example? Are you planning to use MIDI, OSC or will sound generations be a part of this program too? |
MIDI will be the most concrete level. The system will first generate “theoretic score” which is more or less inversely analogous to an orchestral reduction or to open score such as Bach used for The Art of Fugue. At this level there would be little performance data beyond tempi and dynamics. But information about expressive content would be present at higher levels of abstraction. The theoretic score and those expressive abstractions would be used to create a performance score. Finally the performance score and the expressive abstractions would be used to create (through a relatively simple one to one mapping process) the midi data, which would be output to a file—this can include phrasing articulation, timber modulation, note level dynamics, etc. But during composition (creating the theoretic score) real-time MIDI playback will be available with only tempo and dynamics much as it is in the early releases of Sebelius. At this point there is no more than a “place holder” for performance score and until the “theoretic score” generator is fairly far along in functionality no more work will be done on it.
Kassen wrote: | What platform are you developing this for? |
Sorry to say I’m writing it for MS Windows. If I had it to do all over again I would have refreshed my Common Lisp skills and done it under Linux, but that’s water under the bridge now. I’m writing it in Visual C++6.0 Though I may upgrade to VC++2005 I’m using MFC so I won’t incorporate managed extensions or CLI—too big a pain in the ass with MFC. Anyway VC++ was the toolset with which I had greatest facility—so here I am, stomach churning violently every time I create a pointer bug. _________________ The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham |
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sun Sep 11, 2005 5:48 pm Post subject:
|
 |
|
Hell Yeah!
Excelent plans all round, even if common Lisp would have made it more portable. Yes, of cource MIDI will be the most concret-least interesting level but at some level, no matter how marvelous the rest is, sound will need to come out. Windows and MIDI are quite sensible choices from that perspective.
All of this sounds tremendously exciting and exactly like what the world needs right now on a compositional level. I loudly applaud your initiative here.
Do I gather you are aiming at cross-breeding practices of instrumentalism and composition here? I think the concepts you list above are spot on but I'm hazy still on how exctly this would be used in practice. Either way this is very exciting, please keep us up to date on your progress, vision and if at all possible or desirered by all means ask if you might need testers.
I agree with Stein (as often); this is HOT! _________________ Kassen |
|
Back to top
|
|
 |
bachus

Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Sun Sep 11, 2005 8:13 pm Post subject:
|
 |
|
Kassen wrote: | Do I gather you are aiming at cross-breeding practices of instrumentalism and composition here? |
I’m not sure what you mean by that. As a guess I will interpret the question as if you had used the word instrumentation i.e. orchestration.
I have to admit I am still unclear myself on exactly how the transform from theoretic score to final performance level midi data will work. My concentration has been on design and implementation of infrastructure and getting a grasp on the details of where computer music composition currently stands. A great deal has been done in that area the past 10 years and I’m knee deep in books on the subject.
Anyway my hunch about the way it will work is that if you want to use a specific set of “instruments” then a definition of that set must be supplied. The definition of an instrument will include data about its abilities both technical and aesthetic as well as details of to the mappings between system aesthetic parameters and symbols and MIDI data that controls or modulates those parameters in the “instrument.” Generalized dialog forms would be provided for such definitions but ascertaining and entering such data and making the appropriate symbolic links between system aesthetics and “instrument properties” will be up to the user. This “orchestra” data could then be used by the program to constrain aesthetic parameters to produce score that generally suits the defined instruments. But at least in the first iterations of the program the compositional algorithms will not have specific instruments “in mind” while they grind out notes. In the beginning simpler techniques of “orchestration” will be used.
And thanks for the good words and encouragement. At this point I’d be happy just to know that I’ll live long enough with competent mental faculties to get just some of the theoretic score generating code working. Unless you are a programmer you can’t imagine what a depressing shitload of grunge work stands between here and there. I recon it will be a year before there is even a ridiculously limited program to test—but I’ll definitely post it here when it gets to that point.
What I need at this point is a creative discussion of how modes and tonality might be modeled in a graphic vector like manor. _________________ The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham |
|
Back to top
|
|
 |
jksuperstar

Joined: Aug 20, 2004 Posts: 2503 Location: Denver
Audio files: 1
G2 patch files: 18
|
Posted: Sun Sep 11, 2005 9:31 pm Post subject:
|
 |
|
Hey this *IS* a great idea. and it's HOT!!!
Hey, if you need any help, want to delegate a bit of research for someone else to boil down, or need a Beta tester at some point, I'd be very much interested.
Oh, I also have a copy of Schillinger's Musical Composition, and Math in Art if you need references from it. Pretty old, but they are the seeds of much of the research in this area, so not so out dated. |
|
Back to top
|
|
 |
bachus

Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Mon Sep 12, 2005 5:38 am Post subject:
|
 |
|
jksuperstar wrote: | Hey this *IS* a great idea. and it's HOT!!!
Hey, if you need any help, want to delegate a bit of research for someone else to boil down, or need a Beta tester at some point, I'd be very much interested.
Oh, I also have a copy of Schillinger's Musical Composition, and Math in Art if you need references from it. Pretty old, but they are the seeds of much of the research in this area, so not so out dated. |
Thanks but I got the two volume “The Schillinger System of Musical Composition” many years ago though I never made it beyond volume one. I have to say that I did not find it deeply enlightening. But certainly his method of pattern generation is useful from the point of view of a rhythm machine and if fact one of the “generators” I’m working on uses various configurations of multiple modulo operators on a streams of uniformly increasing digits that I’m sure one could prove formally transforms to Schillinger’s system. His system can crank out virtually any rhythmic pattern. He shows examples of these patterns in music real and contrived and then asserts that the system is the underlying principle behind the music. And basically I just don’t buy that assertion.
I would argue that the seeds of the more recent research in this area are found in Schenkerian analysis, which got a stunning reformulization and revitalization in Jackendoff and Lerdahl’s “A “Generative Theory of Tonal Music.” And that work is often quoted in relevant texts from the past decade.
At present David Cope seems to be the single most important figure in the field and whose programs have so far produced the best results in computer generated music based on existing styles.
I have not read “Math in Art” and will take a look at it but I am not optimistic that any general underlying formalization will be found that does more than contribute a trivial simplification of the process of music generation. My reasons for that view are too complex and long-winded to go into here.
Again thanks for the offer of help. Any algorhythmic formulations of virtually any area of music theory that you can find or work out yourself would certainly be useful. Other than that I would like to brainstorm about modes and tonality. I will start another thread on that topic and see if I get any takers. _________________ The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham |
|
Back to top
|
|
 |
DrJustice

Joined: Sep 13, 2004 Posts: 2112 Location: Morokulien
Audio files: 4
|
Posted: Mon Sep 12, 2005 10:03 am Post subject:
|
 |
|
This is intriguing Bachus!
I must admit that I don't quite understand the exact sequence of stack operations and processing steps (yet..) - but I guess that' where some of the magic lies, in the workings of the dynamic stack controller 'Agenda'.
DJ
-- |
|
Back to top
|
|
 |
bachus

Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Mon Sep 12, 2005 10:40 am Post subject:
|
 |
|
DrJustice wrote: | This is intriguing Bachus!
I must admit that I don't quite understand the exact sequence of stack operations and processing steps (yet..) - but I guess that' where some of the magic lies, in the workings of the dynamic stack controller 'Agenda'. DJ
-- |
Oh I fear you will be quite disappointed. The Agenda controller turned out to be a rather simple affair—not much more complex than the execution stack of a typical language. On those stacks the order of dependence is absolute. Execution of each element on the stack is dependent on the result of on the one on top of it. The Agenda is different only in that an element lower on the stack does not necessarily need the result of all or any of the elements higher up in the stack. That’s why the Agenda’s contents may be reorderable while the content on the execution stack of a typical language never is. No magic there at all, really. _________________ The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham |
|
Back to top
|
|
 |
bachus

Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
|
Back to top
|
|
 |
DrJustice

Joined: Sep 13, 2004 Posts: 2112 Location: Morokulien
Audio files: 4
|
Posted: Tue Sep 13, 2005 6:19 am Post subject:
|
 |
|
Thanks a lot for taking the time to write up that explanation!
So any man-handling of the stack is up to the Realization. Always curious, you know. I'm sure there are many members around who enjoyed that - I know there are a few techies hanging around here.
To reinforce the magical aura for myself, I'll reserve the title "Deferred Hierarchial Dependency Reordering and Resolution" for this. Sounds good
DJ
-- |
|
Back to top
|
|
 |
bachus

Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Tue Sep 13, 2005 7:26 am Post subject:
|
 |
|
DrJustice wrote: | So any man-handling of the stack is up to the Realization. -- |
Well not really, the call: m_agenda->PushGoal(g) is carried out unconditionally and that might be considererd man-handling. But to reroder the Agenda the call
result = topGoal->m_directObject->RealizeGoal(topGoal) ;
must set result to the Symbol _reorderAgenda
I Have yet to implement the re-ordering function so there is not a case for it in the switch statement shown in the attachment, but the data structures required to allow it when possible are defined. Since the CGoal object is a list (because it inherits from CTNode) It can carry more information than is immediately apparent from it header definition. The case will look like this
case _reoderAgenda :
Reorder(topGoal) ;
break ;
So the goal that was topGoal has not changed its position on the Agenda but its data list has been altered by the call to Reorder(…) to inform its realization function of the success or failure of the request to reorder. And on the next pass through the OnIdle() loop that goal's Realization function is called again and can continue with that updated data as needed.
Reorder(…) is a member or the Agenda so it is the Agenda controller that manages and has the final say in any reordering. This keeps a relatively clean separation between the CAgenda and the CGoal classes though the list members of a goal store the book keeping data that is need by the Agenda to do the reordering.
I hope that makes some sense. _________________ The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham |
|
Back to top
|
|
 |
bachus

Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Tue Sep 13, 2005 7:50 am Post subject:
|
 |
|
One other point that may be of interest. Because CAgenda inherits from CTNode it too may provide and over-ride to RealizeGoal(…) When the agenda becomes quite long it may turn out that Reorder(…) would best be made a goal and added to the Agenda Rather than executing it in place. We can have goals about gaols. Meta goals! J This would be desirable because all of this stuff we’re talking about goes on in the background. And the time between the call to ExecuteAgendaTop() and the time it exits must, in general, be kept short so that the user interface remains responsive. _________________ The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham |
|
Back to top
|
|
 |
jksuperstar

Joined: Aug 20, 2004 Posts: 2503 Location: Denver
Audio files: 1
G2 patch files: 18
|
Posted: Tue Sep 13, 2005 8:17 am Post subject:
|
 |
|
Quote: | And the time between the call to ExecuteAgendaTop() and the time it exits must, in general, be kept short so that the user interface remains responsive. |
Dare I suggest real-time? Slide around rules on a time line and have your music change on the fly? That opens the door to controllers and sensors acting as part of the composer's brain, if you will. Ah, to dream. But, that's why I have a G2.
Also, if you ever wanted to, GCC and the GTK toolkit is readily available on windows, linux, osx, etc. I use this for embedded programming and simple user interfaces to my shell scripts. Works wonderfully. But it is a bitch to switch tools, I know. |
|
Back to top
|
|
 |
DrJustice

Joined: Sep 13, 2004 Posts: 2112 Location: Morokulien
Audio files: 4
|
Posted: Tue Sep 13, 2005 8:35 am Post subject:
|
 |
|
bachus wrote: | result = topGoal->m_directObject->RealizeGoal(topGoal) ;
must set result to the Symbol _reorderAgenda
... ... ...
I hope that makes some sense. |
Yes, that made it come together. Thanks!
DJ
-- |
|
Back to top
|
|
 |
elektro80
Site Admin

Joined: Mar 25, 2003 Posts: 21959 Location: Norway
Audio files: 14
|
Posted: Tue Sep 13, 2005 8:50 am Post subject:
|
 |
|
jksuperstar wrote: | Dare I suggest real-time? Slide around rules on a time line and have your music change on the fly? That opens the door to controllers and sensors acting as part of the composer's brain, if you will. Ah, to dream. But, that's why I have a G2. |
At this stage we won´t be looking at a realtime tool. This program will build compositions but not dress the structure with audio events in real time.
As such, I don´t think Bachus has ever even considered his to be a realtime tool. Based on my understanding of it, to me it seems that realtime functionality is completely irelevant and not really needed at all. On the other hand, I can see how parts of the code could be adapted to certain realtime tasks. _________________ A Charity Pantomime in aid of Paranoid Schizophrenics descended into chaos yesterday when someone shouted, "He's behind you!"
MySpace
SoundCloud
Flickr |
|
Back to top
|
|
 |
bachus

Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Tue Sep 13, 2005 9:21 am Post subject:
|
 |
|
jksuperstar wrote: | Dare I suggest real-time? |
Because the solution spaces for the low level abstractions will be so very large (even after all reasonable truncation methods have been applied) it’s very hard to see how it could work real-time in my life time—maybe in yours, however
And yes, I have looked at GCC and GTK also Franz Lisp with GTK but I’m past the point of no-return even though I love Common Lisp and it’s my very favorite language.
I do have to say VC++ has the best IDE I’ve ever experienced and I love it passionately. If only MS had had the sense to support Common Lisp the world would be a better place. _________________ The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham |
|
Back to top
|
|
 |
bachus

Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Wed Sep 14, 2005 3:42 am Post subject:
|
 |
|
DrJustice wrote: | Yes, that made it come together. Thanks!
-- |
And thank you. I apologize for not pointing that out initially, and now that I see what your background is also for belaboring some obvious points. Also, the only reason I am so content with OnIdle loop processing is that Implementing a multithreaded application is beyond my competence level. _________________ The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham |
|
Back to top
|
|
 |
DrJustice

Joined: Sep 13, 2004 Posts: 2112 Location: Morokulien
Audio files: 4
|
Posted: Wed Sep 14, 2005 8:34 am Post subject:
|
 |
|
Bachus, you have nothing to apologize for! If anything, I shouldn't be so nosey
A well balanced cooperative system can easily be more efficient and stable than, and as responsive as a multithreaded one. There's nothing inherently inferior about them when applied in the right way. I like cooperative for certain applications (was 'raised' on (embedded) systems where preemption was out of the question for resource reasons).
DJ
-- |
|
Back to top
|
|
 |
BobTheDog

Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Sat Sep 24, 2005 2:09 pm Post subject:
|
 |
|
bachus wrote: | I do have to say VC++ has the best IDE I’ve ever experienced and I love it passionately. If only MS had had the sense to support Common Lisp the world would be a better place. |
Hi Bachus,
If you like the version 6 ide you should upgrade to version 7 which is superb, much better that 6. MFC is still supported so you dont need to go near any of that managed stuff.
Where I work we develop for high performance unix machines but all development is done useing VC++ version 7 on windows as the ide and debugger is so good.
I like the sound of your system, I look forward to seeing it in the future.
All the best
Andy |
|
Back to top
|
|
 |
bachus

Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Mon Sep 26, 2005 5:01 am Post subject:
|
 |
|
BobTheDog wrote: |
If you like the version 6 ide you should upgrade to version 7 which is superb, much better that 6. MFC is still supported so you dont need to go near any of that managed stuff.
Andy |
Thanks, I’m keeping an eye out for the release of version 8 and have been thinking about upgrading then. Your input has convinced me to do that.
I gather that porting a project from 6 to the .net environment is no big deal? _________________ The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham |
|
Back to top
|
|
 |
BobTheDog

Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Mon Sep 26, 2005 6:47 am Post subject:
|
 |
|
bachus wrote: | I gather that porting a project from 6 to the .net environment is no big deal? |
If you are interested in version 8 you can get the beta 2 version from microsoft for about $15 (this covers postage I think, the price may be different slightly), it is time limited I think but it may be worth you having a look. http://msdn.microsoft.com/getthebetas/
A mfc version 6 project will convert over with no problem and you can carry on with it as it is, it will be an unmanaged mfc app and will not use the .net framework at all.
To convert to use the .net framework with managed code running the gui and you existing code running as unmanaged code will be much more of a job but may be worth your while. Gui work with .net is much simpler than with mfc thats for sure, I suppose it all depends how far down the line you already are.
All the best
Andy |
|
Back to top
|
|
 |
|