[gsharp-devel] key signatures

Christophe Rhodes csr21 at cam.ac.uk
Mon Nov 28 11:31:04 UTC 2005


Christophe Rhodes <csr21 at cam.ac.uk> writes:

> I'm attaching my current diff, which covers all but two cases, I
> believe.  The two remaining pieces are

Exactly the same caveats as in my previous message still apply.  I
attach my current patch, updated for the weekend's rearrangements (now
using INVALIDATE-SLICE-USING-STAFF in the relevant places).  Sorry I'm
not being terribly good at actually finishing the remaining
functionality...

What I basically need is, I think, to be able to treat a staff as a
temporally-ordered sequence of elements, irrespective of which layer
they come from; then I can use analogues of CL's sequence functions
(e.g. FIND-IF #'KEY-SIGNATURE-P <seq> :end <pos> :from-end t) to find
the applicable key signature for a given element.  I'm not certain
that this is the right interface, of course: it looks a bit like it
could lead to O(n^2) behaviour quite easily; I think this could be
mitigated by having the sequence for a staff's elements be a
flexirank, because I already keep a cache of a staff's key signatures
in a slot in that staff, so searching for key signatures (and deciding
whether an element is after a key signature or not) would be a simple
comparison of ranks.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: keysig5.diff
URL: <https://mailman.common-lisp.net/pipermail/gsharp-devel/attachments/20051128/635a6e16/attachment.ksh>
-------------- next part --------------

Cheers,

Christophe


More information about the gsharp-devel mailing list