So you should replace the ly:music? predicate with ly:pitch? in order to have $note just be a single pitch. That means that note cannot be a music expression (which already would have a duration) but only a pitch. On another note, you want to add a rhythm here. So you want a copy each time, and $note will achieve that. Which in this case means that you have the identical (not just the same) expression 7 times in a row, and if you transpose the expression, this identical expression in it will get transposed 7 times as well. What's the difference? # introduces a Scheme expression directly as a music expression bypassing any change or interpretation. Your last attempt is almost good, you just need to use $note instead of #note. #note #note #note #note #note #note #note ![]() Using LilyPond syntax (this worked, but transposed the entire group of notes up one octave per call to note, and still leaves the problem of duration): pattern_one = #(define-music-function Trying to return list: pattern_one = #(define-music-function Trying to return multiple values (tried without commas first) pattern_one = #(define-music-function Is there any way to get a function like this to work?Īlternatively, is there a way to multiply notes in the same way as measure-long rests are multiplied ( R1*n)? My attempts: Repeating the note variable in the function body as shown below does nothing (this is expected, as Scheme seems to implicitly return only the last value in the function) And, I can only get it to return one note at a time. I'm completely lost on how to change the note duration (I figured out the argument for a pitch, but have yet to figure out how to add the duration in the function body, considering that * seems to register as invalid syntax, and plain numbers are interpreted as part of the variable name). Place the container where the lily can receive at least four hours of sun each day (or supplement with an energy-efficient grow light, as needed). Carefully fill the container with water to a depth of about six inches. As this would normally involve a large amount of repeated typing, so I would like to define a LilyPond function to do this for me. Place the mix into the container and plant the lily following its planting instructions. I'm working on a song with a repetitive rhythm that changes pitch.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |