Parenthesize a group of notes using a Scheme function

This scheme code puts parentheses around a group of notes.

See also Parenthesize note heads using a Scheme function (snippet #564).