[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help! \mark, and lesson in Scheme
From: |
Anthony W. Youngman |
Subject: |
Help! \mark, and lesson in Scheme |
Date: |
Thu, 13 Jan 2005 00:10:36 +0000 |
User-agent: |
Turnpike/6.02-U (<kadi9FnjOBL6XNAiRMnYuwUxdX>) |
I'm trying to "fix" \mark, so it works for me. Unfortunately, not
knowing my way round Scheme, I've fixed it but in a way that might
crash, and which will be wiped out by an upgrade.
Basically, I've increased the vector size (I guess that's what I'd call
an array?). It seems to be necessary, but I don't understand why. Do
vectors start at 0? I've also tried to increase the check on i, but I've
realised that's probably a mistake! But *might* that cause a crash when
we get to Z?
And I've commented out the line that increments i if it's the equivalent
of "I" or bigger. The result is I'm now getting the letter I as a
rehearsal mark.
============== (original from 2.4.2 define-markup-commands ll 629-
;(define number->mark-letter-vector (make-vector 25 #\A))
(define number->mark-letter-vector (make-vector 26 #\A))
(do ((i 0 (1+ i))
(j 0 (1+ j)))
; swapping these two gets it to work ...
((>= i 26))
; ((>= i 27))
; (if (= i (- (char->integer #\I) (char->integer #\A)))
; (set! i (1+ i)))
(vector-set! number->mark-letter-vector j
(integer->char (+ i (char->integer #\A)))))
==============
All I now need do is make it permanent. I want to create a
"format-mark-alphabet" markFormatter. It seems so obvious - look in
translation-functions.scm, and go from there. Except it seems I need to
modify a copy of make-markletter-markup, and I can't find it to modify!
(And I want to create a "format-mark-barnumber" markFormatter too.)
Both these formatters are needed for Band (both Brass and Wind) music.
Since I noticed (and moaned about) format-mark-letter omitting the
letter I a few months ago, I've been looking for examples. And I have
yet to find ONE. Of the thirty or so pieces I've played since then, if
they had an H, it was followed either by an I or the end of the piece.
And while I haven't looked especially, I think the use of bar numbers
outnumbers the use of numbers as a rehearsal mark. So that's why the
other one's necessary.
Cheers,
Wol
--
Anthony W. Youngman - wol at thewolery dot demon dot co dot uk
HEX wondered how much he should tell the Wizards. He felt it would not be a
good idea to burden them with too much input. Hex always thought of his reports
as Lies-to-People.
The Science of Discworld : (c) Terry Pratchett 1999
- Help! \mark, and lesson in Scheme,
Anthony W. Youngman <=
- Re: Help! \mark, and lesson in Scheme, Erlend Aasland, 2005/01/12
- Documentation (was: Help! \mark, and lesson in Scheme), Anthony W. Youngman, 2005/01/13
- Re: Documentation (was: Help! \mark, and lesson in Scheme), Erlend Aasland, 2005/01/13
- Re: Documentation (was: Help! \mark, and lesson in Scheme), Han-Wen Nienhuys, 2005/01/13
- Re: Documentation (was: Help! \mark, and lesson in Scheme), Erlend Aasland, 2005/01/13
- Re: Documentation (was: Help! \mark, and lesson in Scheme), Han-Wen Nienhuys, 2005/01/14
- Re: Documentation (was: Help! \mark, and lesson in Scheme), Erlend Aasland, 2005/01/16
- Re: Documentation (was: Help! \mark, and lesson in Scheme), Han-Wen Nienhuys, 2005/01/17