Extending LilyPond: 2.1.6 Void functions

### 2.1.6 Void functions

A music function must return a music expression, but sometimes we may want to have a function that does not involve music (such as turning off Point and Click). To do this, we return a `void` music expression.

That is why the form that is returned is the `(make-music …)`. With the `'void` property set to `#t`, the parser is told to actually disregard this returned music expression. Thus the important part of the void music function is the processing done by the function, not the music expression that is returned.

>     noPointAndClick =
>     #(define-music-function
>          (parser location)
>          ()
>        (ly:set-option 'point-and-click #f)
>        (make-music 'SequentialMusic 'void #t))
>     ...
>     \noPointAndClick   % disable point and click

Autres langues : deutsch, español.

#### LilyPond — Extending