[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Color note heads outside nominal instrument range
From: |
Marc Hohl |
Subject: |
Re: Color note heads outside nominal instrument range |
Date: |
Sat, 30 May 2015 13:40:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
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
regards
Peter Gentry
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user
- Color note heads outside nominal instrument range, Peter Gentry, 2015/05/29
- RE:Color note heads outside nominal instrument range, Peter Gentry, 2015/05/29
- RE:Color note heads outside nominal instrument range, Peter Gentry, 2015/05/30
- Re: Color note heads outside nominal instrument range,
Marc Hohl <=
- 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, 2015/05/31