## bpm calculator

Share your Audacity/Nyquist plug-ins here, or test drive the latest plug-ins submitted by Audacity users.

After testing a plug-in from this forum, please post feedback for the plug-in author.
steve
Posts: 47625
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

### bpm calculator

THIS PLUG-IN DOES NOT DETECT BEATS.

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...
Attachments
bpm-calc.ny

steve
Posts: 47625
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

### Re: bpm calculator

steve wrote:Short tutorial to follow...
Mini tutorial here: http://forum.audacityteam.org/viewtopic ... 34#p196934

Robert J. H.
Posts: 1816
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

### Re: bpm calculator

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

Code: Select all

``((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.

steve
Posts: 47625
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

### Re: bpm calculator

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.

Robert J. H.
Posts: 1816
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

### Re: bpm calculator

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.

steve
Posts: 47625
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

### Re: bpm calculator

Robert J. H. wrote:Yes, It's a good idea to integrate the tempo conversion into the quick calculator.
Done: http://forum.audacityteam.org/viewtopic ... 27#p197027
Robert J. H. wrote:I love that plug-in, most particularly for its ability to execute code snippets
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
Robert J. H. wrote: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
Another one has just come up: http://forum.audacityteam.org/viewtopic ... 39&t=69009

Other items for the a "Tools" menu could include:
• Nyquist Workbench
• Regular Interval Labels
• BPM LAbels
Robert J. H. wrote:even the Nyquist Prompt is rather a tool than an effect
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

Robert J. H.
Posts: 1816
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

### Re: bpm calculator

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

steve
Posts: 47625
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

### Re: bpm calculator

Robert J. H. wrote:Ok, let's launch a feature request (-discussion).
Topic split here: http://forum.audacityteam.org/viewtopic ... 41#p197041

naftaliin
Posts: 1
Joined: Sun May 08, 2016 5:03 am
Operating System: Windows 7

### Re: bpm calculator

Hello!

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.

steve