Heart rate variability (HRV) is a measure of variation in the heart rate. Over the last 25 years, HRV analysis has became utilized more often as a non-invasive research and clinical tool for indirectly investigating both cardiac and autonomic nervous system (ANS) functions in health and disease. In our experiment, 22 healthy subjects and four testing rhythm patterns are studied. How the three musical-rhythmic characteristics of tempo, complexity and drum sample affect the performance of HRV is discussed and a computational model with four factors is proposed. This relationship can help us to improve our life and health by music.