We introduce an linear time algorithm for transcribing RR intervals into music rhythms using approximate common divisors (ACDs). The technique maps ACDs to nodes on a graph, node transitions represent heart rate variations, and a balance must be struck between rhythmic changes and heart rate variation. Possible transcriptions correspond to paths in the graph. Given a set of weights, a shortest path algorithm finds the optimal transcription. The representation facilitates efficient pattern recognition and extraction. The technique is applied to the Physionet Long Term Atrial Fibrillation Database to demonstrate how it shows the rhythmic variation within heartbeat subsequences having the same labels, and its utility in detecting potential labelling errors on its own and via the rhythm simplex. Further work is needed to explore the method's potential application to arrhythmia stratification.