This package provides a command for creating slashed beams with Lilypond. The code herein was written by Andrew Bernard and repackaged into a lyp package. It was originally distributed as part of OpenLilyLib.
lyp install slashed-beams
\require "slashed-beams"
...
For more information see the included example.