A drum machine is a piece of analog or digital equipment that electronically reproduces drum sounds. Typically, a drum machine will have sounds and patterns. Early drum machines contained few sounds and preset patterns that could be selected by the user. Later drum machines allowed patterns to be programmed and arranged into songs.