During volcanic eruptions, domes of solidifying magma can form at the volcano summit. As magma ascends it often forms a plug bounded by discrete fault zones, a process accompanied by drumbeat seismicity. The repetitive nature of this seismicity has been attributed to stick-slip motion at fixed loci between the rising plug of magma and the conduit wall. However, the mechanisms for such periodic motion remain controversial. Here we simulate stick-slip motion in the laboratory using high-velocity rotary-shear experiments on magma-dome samples collected from Soufrière Hills Volcano, Montserrat, and Mount St Helens Volcano, USA. We frictionally slide the solid magma samples to generate slip analogous to movement between a magma plug and the conduit wall. We find that frictional melting is a common consequence of such slip. The melt acts as a viscous brake, so that the slip velocity wanes as melt forms. The melt then solidifies, followed by pressure build up, which allows fracture and slip to resume. Frictional melt therefore provides a feedback mechanism during the stick-slip process that can accentuate the cyclicity of such motion. We find that the viscosity of the frictional melt can help define the recurrence interval of stick-slip events. We conclude that magnitude, frequency and duration of drumbeat seismicity depend in part on the composition of the magma.