The source mechanism of long-period (LP) events is examined using synthetic waveforms generated by the acoustic resonance of a fluid-filled crack. We perform a series of numerical tests in which the oscillatory signatures of synthetic LP waveforms are used to determine the source time functions of the six moment tensor components from waveform inversions assuming a point source. The results indicate that the moment tensor representation is valid for the odd modes of crack resonance with wavelengths 2L/n, 2W/n, n = 3, 5, 7, ..., where L and W are the crack length and width, respectively. For the even modes with wavelengths 2L/n, 2W/n, n = 2, 4, 6,..., a generalized source representation using higher-order tensors is required, although the efficiency of seismic waves radiated by the even modes is expected to be small. We apply the moment tensor inversion to the oscillatory signatures of an LP event observed at Kusatsu-Shirane Volcano, central Japan. Our results point to the resonance of a subhorizontal crack located a few hundred meters beneath the summit crater lakes. The present approach may be useful to quantify the source location, geometry, and force system of LP events, and opens the way for moment tensor inversions of tremor.