a real time , multi - function beat counting system used in machine perception of musical rhythms employs a high speed stable algorithm including down sampling and group summing of the original signal , pulse matching on peak points , and check - frame decision making . the down sampled and group summed signal is utilized to derive an onset peak train formed of a series of data points . the onset peak train is divided into frames , and a threshold value is determined for each frame . in each frame , peak profiles are determined , each comprising successive data points within the frame having values greater than the threshold value . within each peak profile , a peak point is identified . an algorithm is employed to compare the onset peak train with a plurality of unit data pulse sequences having different periods , and a match is determined between the onset peak train and the closest one of the unit data pulse sequences to identify the period of the rhythm .