Hello Pierre-Luc, It works for me if I copy and paste your code. Can you maybe attach a ly file that does not work for you?
Cheers, Valentin Am Donnerstag, 15. Juni 2023, 18:25:37 CEST schrieb Pierre-Luc Gauthier: > What am-I doing wrong here… ☹ > > \version "2.25.6" > > \language "english" > > #(define instrumentsInfo > '( > (piccolo . ((fullName "Piccolo") (transposition #{bf'#}))) > )) > > instrumentInfoLookup = > #(define-scheme-function > (instrument info) > (symbol? symbol?) > (car (cdr (assq info (cdr (assq instrument instrumentsInfo)))))) > > #(display (instrumentInfoLookup 'piccolo 'fullName)) > #(display (instrumentInfoLookup 'piccolo 'transposition)) > > part = > #(define-music-function > (music fullName transposition) > (ly:music? markup? ly:pitch?) > #{ > \new Staff \with { > shortInstrumentName = fullName > } << > \transpose $transposition c' > $music > > >>#} ) > > %\part c' "test" bf > \part c'' #(instrumentInfoLookup 'piccolo 'fullName) > c''%#(instrumentInfoLookup 'piccolo 'transposition) > > The ly:pitch? predicate fails. Is there a way for that pitch to be > sent as a correct ly:pitch? ¿ > > Thanks for any pointers.
signature.asc
Description: This is a digitally signed message part.