Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] types & design advices (musical program)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-10-19 (14:56)
From: Diego Olivier Fernandez Pons <Diego-Olivier.FERNANDEZ-PONS@c...>
Subject: Re: [Caml-list] types & design advices (musical program)

I did all my musical studies in France, so I may not use the same
vocabulary than you. If you do not understand what I mean (or think I
misunderstood what you were telling me), just feel free to ask more

> Thx in advance. My future plan is automatic transcription from
> numeral bass to 4-voice choir (automatic music-theory example
> solver).

If you mean harmonisation, it is a well known problem and has been
studied in constraint programming world (since it is a declarative
problem). You should look to the Principles and Practice of Constraint
Programming Conference Proceedings (Springer LNCS) (I will give more
information monday)

I remember a research report from LIP6 (in english) explaining how
they did a oriented object constraint solver for music harmonisation
in SmallTalk, but LIP6 server being down, I haven't been able to
localize it.

There is also some papers by Xavier Rodet's and alii at Ircam (they
adapted the well known Lisp constraint programming engine Screamer to
solve music constraints in Open Music)

What you need is a small constraint solver. There is already one
in Caml (FaCiLe) which has been used to handle air traffic control by
the ENAC.

If what you want to do is simple, it should be enougth.

But I am afraid FaCiLe code is not very clean. I read it once because
I wanted to include a simplex algorithme and I gave up. Roughtly it
uses :
- Objects to handle constraints
- A simple constraint repository
- AC6 constraint propagation algorithm
- Finite domains are represented by simply linked lists

If you face a combinatorial explosion problem, you may need to use
smarter tricks (but I really don't think it will be the case unless
you are trying to solve very huge music problems).

First try to define you own goals, constraint propagation rules and
search strategy (see advanced usage in FaCiLe manual). If it still
doesn't improve enought, then you will have to write down your own
constraint solver with smarter algorithms like :
- Diet trees to represent finite domains
- DAC or PC constraint propagation (only an idea, but I don't think
there is much to gain here, unless your problem has special
mathematical properties)
- Heuristics and a priority-search queue for your exploration

I have written a prototype general purpose constraint solver (written
over Baire and my graph library) inpired by ALICE (Laurière 78) but it
is still at an experimental stage and will need several months of more
work, so do not hold your breath.

        Diego Olivier

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: