bpm calculator


By far the most accurate way to calculate the tempo of a piece of music is the “count” the beats in a time period and calculate the tempo.
For example, if there are 8 bars with 4 beats per bar in 20 seconds, then the tempo is…

well the answer is 96 bpm.

This plug-in is just a simple calculator that makes the measurement and calculation easy.

Short tutorial to follow…
bpm-calc.ny (1.08 KB)

Mini tutorial here: https://forum.audacityteam.org/t/how-to-calculate-musical-tempo-bpm/27107/1

Hi Steve
Maybe it would be nice to add the conversion values for a new bpm tempo as well.
There is always some confusion about which percentage values are to be entered in the different time sliding/tempo change tools in order to change the tempo to a new bpm value.
I suggest to add a new control where you can enter a final target value and your plug-in shows the values that have to be entered in the different tools to have the piece playing at the desired speed eventually. For example:
You enter 4 bars of 8 beats each and a target tempo of 96. Your tool calculates an initial tempo of 108 bpm. It then supplies you with the percentage values for the new tempo. In our case this would probably be

((96 -108)/108)*100)=-11.1111 %

This is the value that has to be entered in the Sliding Time Scale/Pitch Shifting tool for both, the start and end tempo controls.
In other tools this value may be 88.88889 % of the original tempo, I didn’t check this.
Paul stretch, on the other hand accepts only factors (0.88889, I guess) but I am not sure if such slightly changing factors make sense for this effect in order to work properly.
I know, this all sounds pretty confusing but the different tools and their controls are sometimes confusing too, thus my proposal.

Thanks for the suggestion Robert.
I agree that a “calculation helper” for the “Change Speed” and the “Sliding Time Scale/Pitch Shift” tool would be useful, but I’d rather keep this plug-in very simple.

Personally I use the “Change Tempo” effect as a “calculation helper”. Just enter the start and end tempo in the Change Tempo effect and the % change is displayed without needing to run the effect. I agree that it may not be obvious to new users to use Change Tempo as a calculator (just as it may not be obvious to use the Amplify effect to find the peak amplitude of a section).

I wrote another calculator plug-in some time ago called “Quick Calculator” (qcalc.ny). It mostly just does conversions and it is a Generate type plug-in (so that no track selection is required). I think I’d rather add “Tempo Change as %” to the Quick Calculator plug-in and leave this plug-in really simple.

Yes, It’s a good idea to integrate the tempo conversion into the quick calculator.
I love that plug-in, most particularly for its ability to execute code snippets which you don’t want to enter in the Nyquist prompt because there is already a greater chunk of code.
Incidently, it may be the right time to re-establish a tool menu for these plug-ins that do not work with the selection or generate any sound. The most prominent examples that come to my mind are

  • Quick Calculator
  • Apropos
  • Nyquist Reference

And there are surely others which could be integrated under this menu (even the Nyquist Prompt is rather a tool than an effect).
By the by, did you ever try to write a beat detector that tries to calculate a tracks tempo? It’s rather a hard task, I’d imagine, since there is a kind of AI involved.

Done: https://forum.audacityteam.org/t/quick-conversion-calculator/15589/3

Ironically that is the feature that I almost did not include.
I thought that perhaps no-one but myself would have any use for that feature so I almost left it out. It just goes to show :smiley:

Another one has just come up: https://forum.audacityteam.org/t/a-simple-plugin-to-add-a-label/27092/1

Other items for the a “Tools” menu could include:

  • Nyquist Workbench
  • Regular Interval Labels
  • BPM LAbels

That’s debatable.
Currently it is built as an effect. It requires an audio selection and the symbol “s” carries the track audio data.
There could equally be a “generate”, “analyze” and a “tools” version of the Nyquist Prompt. That is (in part) what the Nyquist Workbench is.
Perhaps if we have a “Tools” menu we could put in a feature request for a “Tools” version of the Nyquist Prompt to replace the current version, which has options (radio buttons) to make it behave as either a Generate, Process, Analyze, or Tools effect, but I think that would be for later.

Do you want to go ahead with a feature request for a “Tools” menu, and “Tools” type Nyquist plug-ins now? If so, then I suggest that we continue this discussion on the “Adding Features” board: http://forum.audacityteam.org/viewforum.php?f=20

Ok, let’s launch a feature request (-discussion).

Topic split here: https://forum.audacityteam.org/t/tools-menu/27122/1


I tried this calculator and it is good. But would it be possible to make it as a toolbar? One that actively displays the calculated BPM value when a selection is made and updates its value when selection length is changed? This would speed up things more.

That’s not possible as a Nyquist plug-in. It would need to be written into the Audacity code.