calculating beats

B for each beat, A for steady stream. Both need to be changed based on values found with Kiwi