Super simple setup to count beats per minute in Xpresso with Python node. Counting starts immediately when time is running. You can easily modify codeĀ  for your needs e.g. starting time.

import c4d

def main():
    global out # Output port: 'Out'

    bpm = 128 # Beats per minute
    spb = 60.0 / int(bpm) # Seconds per beat

    if time != 0: # If current frame is not first frame
        out = int(time/spb) # Hits count
    else: # Otherwise
        out = 0 # Hits count is 0

bpm_in_xpresso.c4d

Cinema 4D, Python, Xpresso