⌂ Shorthand for triplets
If you have lots of triplets and want to save some typing, you can define your own \triplet command. This is a simple illustration of how to define your own Scheme function with embedded LilyPond code.
The example shows two possible implementations, one (\triplet) where you have to enclose the triplet
notes withing curly braces and one (\trip) that takes the following three music expressions and
combines them into a triplet. The latter alternative saves even more typing, since you don't need the
curly braces. On the other hand, it makes the input file slightly harder to read and if you have a
triplet with more than three notes (see the example) you need to add some curly braces to get exactly
three arguments to the function.