A novel approach for analysing cardiac rhythm data is presented in this paper. Heartbeats are decomposed into the five fundamental P, Q, R, S and T waves plus an error term to account for artifacts in the data which provides a meaningful, physical interpretation of the heart’s electric system. The morphology of each wave is concisely described using four parameters that allow all the different patterns in heartbeats to be characterized and thus differentiated This multi-purpose approach solves such questions as the extraction of interpretable features, the detection of the fiducial marks of the fundamental waves, or the generation of synthetic data and the denoising of signals. Yet the greatest benefit from this new discovery will be the automatic diagnosis of heart anomalies as well as other clinical uses with great advantages compared to the rigid, vulnerable and black box machine learning procedures, widely used in medical devices. The paper shows the enormous potential of the method in practice; specifically, the capability to discriminate subjects, characterize morphologies and detect the fiducial marks (reference points) are validated numerically using simulated and real data, thus proving that it outperforms its competitors.