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 lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user