[gsharp-devel] Lyrics!

Christophe Rhodes csr21 at cam.ac.uk
Mon Mar 8 20:34:39 UTC 2004


Robert STRANDH <strandh at labri.fr> writes:

> Christophe Rhodes writes:
>  > I'm not getting hyphens and underscore
>  > extenders at all right -- I'm not even placing the lyrics below the
>  > staff!
>
> Perhaps lyrics should have their own (invisible) staff, they way
> percussion should have.  All lyrics could then go in one staff with
> each line on a different "staff line". 

I think this, or something like it, is going to be necessary, yes.
More below.

>  > Also, from a representational point of view, I have currently got a
>  > firm association between a cluster and a lyric.  This is non-optimal
>  > for two reasons: one, music with a verse structure often has more than
>  > one set of lyrics for the same notes; two, there is often a need for a
>  > more horizontal notion of lyrics (as an example, consider the act of
>  > deleting an element from the score: it is very unlikely that you also
>  > want to delete its associated lyric).
>
> Right.  I think lyrics should be placed in their own layer, probably
> one layer for each set of lyrics.  Each "word" in the lyrics should
> have values for "notehead" and "dots" so that its duration can be
> calculated.  
>
> One could even imagine that having the cursor in such a layer changes
> some aspects of the keyboard mappings so that `c', `d', etc will
> insert characters instead. 

Right.  Currently, I implemented this by having a Lyrics mode, which
had alphabetic characters executing com-self-insert (shades of
emacs!), and #\- and #\Space going to the next cluster, except that
that was buggy.

> There is also another (existing) general mechanism that will be useful
> for lyrics, namely the possibility of having a horizontal offset of
> an element compared to its timeline.  I currently use it to avoid that
> crossing voices on the same staff overlap physically.  For lyrics, it
> could be used to align whatever letter you want with the timeline. 

I think there are some basic rules that get you 90% of the way there:
  * align the middle of the syllable with the cluster...
  * ... except for the first word of a sentence, which should align
    the first letter with the cluster...
  * ... and the last word, which aligns the full stop.
I think that's one convention, anyway.

> Speaking of which: As an SBCL expert, perhaps you know more about
> how to profile code than I do.  Refreshing a page of
> "rapsoden-sjunger" takes around a second, which is a little too
> much.  I have tried profiling pretty much everything in the gsharp
> packages and in the McCLIM packages, without any conclusive results.
> As a started, I would like to know whether it is computing the score
> or drawing it that takes time.  Do you have any ideas about how to
> do that?

I guess I would (profile "CLIMI" "GSHARP"), and see what hotspots that
reveals with the workload you describe (refreshing the score 10 times,
say).  If you know the entry points to computation and drawing, then
profiling just those functions would be worthwhile (time and space
costs of their unprofiled callees is respectively tallied under the
profiled callers).

Cheers,

Christophe
-- 
http://www-jcsu.jesus.cam.ac.uk/~csr21/       +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%")    (pprint #36rJesusCollegeCambridge)




More information about the gsharp-devel mailing list