[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Color note heads outside nominal instrument range
From: |
Peter Gentry |
Subject: |
Re: Color note heads outside nominal instrument range |
Date: |
Sun, 31 May 2015 17:18:03 +0100 |
Message: 2
Date: Sat, 30 May 2015 13:40:13 +0200
From: Marc Hohl <address@hidden>
To: address@hidden
Subject: Re: Color note heads outside nominal instrument range
Message-ID: <address@hidden>
Content-Type: text/plain; charset=windows-1252; format=flowed
Am 30.05.2015 um 12:38 schrieb Peter Gentry:
>
> FWIW
>
> I have attached a slightly simplified and better version of
> instrument_ranges.ly
I haven't tested your code, but I like the idea of defining instrument-specific
tonal ranges quite a lot!
Some ideas/proposals:
1)
Can you store the tone range for each instrument in an alist?
(define range-alist
'((
("clarinet" . ( -10 . 34 ))
("bass-clarinet-c" . ( ...
)))
or even better, use pitches? You can extract upper and lower bounds from this
alist and don't have to write a conditional check for
each instrument.
2)
IIUC, the line
(if (or ( > op 34) (< op -10) ) (begin (set! o (+ o 1))) ))
adds one octave to the pitch if the note is lower than the lowest possible note
OR higher than the highest possible note?
The latter doesn't seem quite right to me ;-)
(and (< op -10)
(set! o (+ o 1)))
(and (> op 34)
(set! o (- o 1)))
seems to do the trick (untested).
Apart from that, such a function is a valuable extension for lilypond IMHO.
Cheers,
Marc
Actually Marc I have revised and simplified the calculation (see attached) - I
simply wanted to indicate notes outside the range
modify then to fall inside the range. The colour then gives engraver/player the
option to play within range or if that is awkward
play rests. I haven't sent to list before to save everyone the fag of looking
at it again.
regards
Peter Gentry
instrument_ranges_check.ly
Description: Text Data
- RE:Color note heads outside nominal instrument range, (continued)
- RE:Color note heads outside nominal instrument range, Peter Gentry, 2015/05/30
- Re: Color note heads outside nominal instrument range, Marc Hohl, 2015/05/30
- Re: Color note heads outside nominal instrument range, David Nalesnik, 2015/05/30
- Re: Color note heads outside nominal instrument range, Gilles THIBAULT, 2015/05/31
- Re: Color note heads outside nominal instrument range, Simon Albrecht, 2015/05/31
- Re: Color note heads outside nominal instrument range, Thomas Morley, 2015/05/31
- Re: Color note heads outside nominal instrument range, Thomas Morley, 2015/05/31
- Re: Color note heads outside nominal instrument range, Gilles THIBAULT, 2015/05/31
- Re: Color note heads outside nominal instrument range, Gilles THIBAULT, 2015/05/31
- Re: Color note heads outside nominal instrument range, Thomas Morley, 2015/05/31
Re: Color note heads outside nominal instrument range,
Peter Gentry <=