2011/7/24 Janek Warchoł <lemniskata.bernoull...@gmail.com>: > Oops, sorry for the late answer! > > 2011/7/18 Mario Moles <mario-mo...@libero.it> >> even if I correct the syntax (without "= c", "= d", "= f") the error remains. > > I'm surprised too. > I've discovered that when you use words for alteration (i.e. > ,(ly:make-pitch 0 1 FLAT) for des, ,(ly:make-pitch 0 3 SHARP) for > fis) everything seems to work. > You can also use \contextStringTuning described in Notation Reference. > I don't have much experience with ly:make-pitch not tab tunings, so > maybe i'm missing something, but i'm forwarding this to bugreports. > > %% this throws a GUILE error: > \version "2.15.5" > \new TabStaff { > \set TabStaff.stringTunings = #`( ,(ly:make-pitch 0 0 0.5) > ,(ly:make-pitch 0 3 0.25) > ,(ly:make-pitch 0 5 -0.5)) > cis' fih' as' > }
This is a bug in ly_scm2rational. Rational ly_scm2rational (SCM r) { return Rational (scm_to_int64 (scm_numerator (r)), scm_to_int64 (scm_denominator (r))); } This assumes that a scheme rational will be a fraction, since scm_to_int64 expects an integer. If we pass a floating point rational (like the alterations in ly:make-pitch above), scm_numerator and scm_denominator return floating point objects. A possible fix would be to use inexact->exact to tidy up the arguments before converting to integers: Rational ly_scm2rational (SCM r) { return Rational (scm_to_int64 (scm_inexact_to_exact (scm_numerator (r))), scm_to_int64 (scm_inexact_to_exact (scm_denominator (r)))); } Cheers, Neil _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user