[gsharp-devel] Architecture question

Robert Strandh strandh at labri.fr
Mon Jul 19 16:37:28 UTC 2004


Hello, 

I have an architecture-related question, or rather, I have some
thoughts that I would like to bounce on the members of this list,
probably mostly Tim and Christophe.  

Here are my thoughts.  Please comment on them and correct me if I am
wrong. 

The score-pane is supposed to be reusable in other programs that need
to display scores.  For that reason, the score pane should not know
about the internal data structures of Gsharp, nor about its GUI. 

On the other hand, it would be handy for other clients of the score
pane to have ready-made presentation types that allow them to present
a clef, a notehead, etc without having to write all that from
scratch. 

At first, I thought that was impossible, because the presentation
types for these objects would typically be the classes of the internal
data structure of Gsharp. 

But then I realized (from reading the CLIM specification more
thoroughly) that the presentation types could be disjoint from the
classes of the internal data structure. 

The score pane module could then contain definitions of presentation
types for most music objects, including how they are highlighted when
the mouse passes over them etc. 

But, the symbols that are used as names of presentation types
(presumable `clef', `notehead', `staff', etc.) would likely clash with
symbols in the package that is used for the internal data structures
of the client. 

The best solution to that problem would perhaps be to have the score
pane not be `use'd by clients code, and to have a short abbreviation
for the score pane package, such as `spn'.

If I am right, I should start migrating all the presentation types of
musical symbols to the score pane. 

Thoughts? 
-- 
Robert Strandh

---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------




More information about the gsharp-devel mailing list