Old 09-15-2015, 07:36 AM   #1
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 340
Default Introducing the ReaMix Beat Mapper Tool!

Hello everyone!

I'm very happy to announce the release of my ReaMix Beat Mapper Tool. :-D

A semi-automatic beat mapper that can actually work! :-O *

Putting it another way. It can actually detect tempo and mark out a tempo map! ;-) *

After all, isn't a computer made to automate computational tasks?

* As always. Conditions apply.

Here's how it works.
The ReaMix Beat Mapper Tool is a ReaScript that uses a simple but effective algorithm. It uses a base BPM as a reference point and a percentage of variance the BPM can go up or down, as well as how many beats to cover per tempo marker (default is a whole bar). It will then calcuilate a minimum and maximum BPM window to scan over that is offset from the starting point. It then moves to the next transient from this offset and if it is inside range it marks the starting point with a tempo change from the calculated BPM for that section. It then uses the end point located as the next starting point and scans for the next BPM until it either misses or reaches the end.


Installation.
Download it from the stash here:
https://stash.reaper.fm/25127/ReaMix%20Beat%20Mapper.zip

Then extract the contents to your Reaper resource folder. In Reaper the Actions menu will have an item to open up the Reaper resource folder on your desktop. So do this. Then extract the archive contents to this Reaper resource folder. I have included a Scripts folder in the root of the archive so you can copy that direct to the resource folder or you can copy the Hypex folder inside it (named after me) to your Reaper Scripts folder. Just my way of trying to organise things. :-)

Then back in Reaper you can bring up the Action window from the Action menu or by pressing "?" key and load it in as a ReaScript with the "New/Load..." gadget.. I have assigned it to "B" on my OSX keyboard. B for Beat. :-)

Preparing to use it.
The timebase must be set correctly so tempo markers occur at the right time and the grid matches the tempo. For this I use the following project settings. Timebase for items/envelopes/markers set to Time. Timebase for tempo/time signature envelope set to Beats.

Next make sure there are no partial measures before the first mapped beat will occur otherwise it will really mess up the grid. If you can, use Reaper to create a measure or few up to the first point even if the BPM is a bit off. As long as a grid line crosses on the first point it will be fine.

Then make sure your Transient Detection Settings are suitable. The default may work fine. You can test with tab to see if you think it will hit the mark. Given the core of the beat mapper is to detect when the next beat starts within the BPM window and accurately it relies on the transient settings working for it.


Modes of operation.
There are two modes of operation offered. Window mode and Target mode. Window mode is the standard mode as described. Target mode locates the nearest transient to the base BPM. Window mode will likely be most effective..


How to use.
You need to select an item for it to work off. And set the cursor to the first beat. Tabbing to transient is easiest. If you want to mark a time selection to scan do so as it will work in a time selection if one is set. If the cursor is outside the time selection it will use the starting point of the time selection as the first beat. If you only wish to scan within the selected item don't forget to clear the time selection. It will use a time selection if one is set.

Next load it up. The ReaMix Beat Mapper will then bring up a window for settings to use as follows:

Base BPM Reference: Base BPM to use as reference value. Default is project tempo.
Variance (Percentage): Amount that BPM is expected to vary either way. Default is 5%.
Beats per Marker: Number of beats to cover per tempo marker. Default is time signature beats per bar.
Allowance (For errors):Number of beat misses to allow for. Default is 0.

Base BPM Reference:
The Base BPM sets the baseline for the BPM which acts as a centre point From this the scanning window will be calculated around. You could find what sort of value to place in here, if you don't know what it should be on average, by using Reaper to detect tempo from time selecting a bar and using that as a guide.

Variance (Percentage):
Window mode: The Variance specifies a percentage where the lowest to highest BPM window will then be calculated. For example, with common time, a BPM of 120 will have a bar duration of 2 seconds. A 5% variance will allow for the tempo to travel from 114 to 126 BPM, with 5% allowing for 6 BPM up or down. Or, approximately 1.9 to 2.1 seconds. A lower BPM will have more time per bar, a higher BPM less time. The time window is always calculated on a beat basis, based on how many beats to mark per bar.

Target mode: You can enter 0 as a percentage to specify Target mode. This will use the Base BPM as a target and will locate the nearest transient. Allowing for one beat either side of the BPM up or down. But it is only really useful for a stable tempo as accurate beats will be needed. Still, it is provided just in case it is of some use.

Beats per Marker:
This will set the amount of beats to cover between tempo markers. For 4/4 time; 1 will mark every beat or quarter bar, 2 will mark every two beats or half bar, and 8 will mark every 8 beats or two bars. Note that it will scan for that exact amount and if it misses a beat, even if one beat is set, it won't attempt to fill in the gaps. This is just the nature of the routine which scans for what it is told to.

Allowance (For errors)
The Allowance sets how many misses to allow for before it stops. Set to 0 to stop dead on the first, otherwise set to how many errors you would accept. Being that a missed beat is out of range this is considered to be an error. However, it can continue on despite this and if allowed will then use the out of range beat detected as the next point to scan from.


Give it the OK and it will then scan over the selected area and attempt to detect beats and mark them as tempo changes When it finishes it will give you a report. Consisting of the following statistics:

Beats mapped: How many beats it was able to mark and tempo map.
Beats missed: How many beats missed, if any.
Bars marked: How many whole bars were tempo mapped in total.

As well as the following:
A BPM range detected from lowest to highest.
A BPM average from this.
An effective variance corresponding to the largest percentage up or down the tempo varies from the baseline.


As with anything, the results depend on what it has to work with. For example, I find it works best on a kick drum track that is clean (low bleed from other sounds) and a consistent rhythm with a fairly stable BPM. One track I tested with the right settings was able to pefectly tempo map a section over four minutes long and mapped over 140 bars! That of course is a best case scenario. Likely your track might have bleed, unstable tempo changes and breaks. Or hardly any percussion at all in sections. But with a bit of experiemntation you can work around this and auto map most beats. Manually adding tempo markers where needed. I've tested with a few tracks that miss drums over a period of bars or where the drums change pattern which can mess it up but having this in mind and working on separate sections at a time can help to get around this. You can then fill in the gaps manually if needed. It is after all a simple tool that does what it can.


Conclusion.
In conclusion, I hope my ReaMix Beat Mapper Tool will be useful in auto mapping music tempos. Give it a test and see how it goes. Share results here and I will see what I can do to improve it. Perhaps it isn't quite yet the Holy Grail of an automatic tempo mapper we are all looking for but you gotta simply start somewhere. Enjoy! :-D

Tutorial.
Check here for a tutorial:
http://forum.cockos.com/showthread.p...29#post1746429

Toolbox V1.5 update:
http://forum.cockos.com/showthread.php?t=184620

Last edited by Hypex; 12-04-2016 at 06:28 PM.
Hypex is offline   Reply With Quote
Old 01-21-2016, 04:24 AM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 7,610
Default

@hyphex
hi, thanks for sharing !

maybe you could make a video demo of it ?
X-Raym is offline   Reply With Quote
Old 01-21-2016, 04:49 AM   #3
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 13,625
Default

indeed, a video would be great

I'm not sure how I managed to miss this before now!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is online now   Reply With Quote
Old 01-21-2016, 05:14 AM   #4
SmajjL
Human being with feelings
 
SmajjL's Avatar
 
Join Date: Nov 2013
Location: Sweden
Posts: 2,430
Default

Boney M Painterman tempomapped using one finger, with minor miss'uses, my first try with default settings.
Cool of you to do this Hypex.
Is it possible to utilize your work and add stretch markers instead/both maby? i'm sure you know why and both is very usefull.
A button or a tweaked second script doesn't matter, what ever is easyest if that is a word in coding.
Possible?

Last edited by SmajjL; 01-21-2016 at 05:30 AM.
SmajjL is offline   Reply With Quote
Old 01-23-2016, 07:49 AM   #5
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 340
Default

Hi guys. Thanks for the kind words. I thought I had passed under the radar here.

@X-Raym

Haha. Like your funny twist on my nick. :-)

I actually was going to do a video in the past. But spent so much time perfecting the mapper after learning EEL with help from your site (of course) that by the end of it I just wanted to upload it. A month studying and another month coding. I've downloaded the tool to record anims from Reaper. Good time to use it. :-)
Hypex is offline   Reply With Quote
Old 01-23-2016, 07:53 AM   #6
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 340
Default

@musicbynumbers

I know right! I became obsessed with looking up beat mapping on the forums. And after soaking in all the info I saw a need and thought I could help. I tested my theories and found my simple idea could work so I put the work in.
Hypex is offline   Reply With Quote
Old 01-23-2016, 08:04 AM   #7
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 340
Default

@SmajjL

No way! Way? :-)

So what's what's your deal with Boney M Painterman man? Is it the Holy Grail of tempo un-mappable songs. LOL! :-D

I know what you mean and yes I think what you say is possible. Infact I thought I could also do a Beat Marker script at one time. Where it adds normal markers to give you more control. Suppose stretch markers could be added the same way.

BTW, what happened to your "Reaper Drifting Championships " thread? Am I currentlly in first place? You didn't reply to my post. ;-)
Hypex is offline   Reply With Quote
Old 01-23-2016, 08:11 AM   #8
ernie
Human being with feelings
 
Join Date: Feb 2015
Posts: 173
Default

yeah, a video would be great to explain it easily!
__________________
PS: ich benutze die deutsche Reaper-Sprachdatei :)
ernie is offline   Reply With Quote
Old 01-23-2016, 01:21 PM   #9
SmajjL
Human being with feelings
 
SmajjL's Avatar
 
Join Date: Nov 2013
Location: Sweden
Posts: 2,430
Default

Hey Hypex Way! I hope.

Actually, yes LoL the whole g'damn album! just Love it as a Reference for the word, Drifting.
Well, as you might know already, I can.. fix them, I am just little obsessed in believing Reaper/Coding can do these things better/clever and automagic, i'm of course inspired by Live, even if some material fails, it does a pretty good job in remixing or, supporting a remix'er.
My first thought when I saw your script was, theoretically possible alert!

I can now do the audio to MIDI + EQ thing and record, but it is not as fast or precise specially on faster speeds, and with stretch markers I see potential problems more clear etc etc & etc. :P
Sound like that's when the seed entered my head, sssssome time ago and I have been away for a while, we got better stretch markers now also and some coders who can spell qwerty pretty fast.
I am very optimistic.
Ps, Oh yes, for grid tempo, people need this and I am also a people.

When you experiment behind the scenes, Boney g'damn M!
Good job man.
__________________
:)
SmajjL is offline   Reply With Quote
Old 01-24-2016, 03:07 AM   #10
SmajjL
Human being with feelings
 
SmajjL's Avatar
 
Join Date: Nov 2013
Location: Sweden
Posts: 2,430
Default

__________________
:)
SmajjL is offline   Reply With Quote
Old 01-25-2016, 06:14 AM   #11
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 340
Default

SmajjL, great reply man. Hahaha. :-D

So I'll take a look into this. And see what the API can do. Should be straight forward enough.

In the meantime I'll get that video together. I knew I wrote too much. The 7" version of the instructions is on the stash. :-)
Hypex is offline   Reply With Quote
Old 01-25-2016, 07:27 AM   #12
SmajjL
Human being with feelings
 
SmajjL's Avatar
 
Join Date: Nov 2013
Location: Sweden
Posts: 2,430
Default

You are welcome! and thank you!
Also by coincidence, I found the image in here somewhere.
http://australiandriftinggp.com.au/
__________________
:)
SmajjL is offline   Reply With Quote
Old 01-25-2016, 10:59 AM   #13
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Germany
Posts: 983
Default

Thanks for this tool!

I just tried it on an Isis (the band) song that I would like to cover. Unfortunately it couldn't really pick up the beats but I'm sure it will work fine with more "straight forward" sounding recording where the actual drum beats are a bit clearer than in doom metal. Haha!

Would be nice if you could either post or move this to the JSFX/ReaScript thread. Maybe this way even more people interested in scripts would see it
timothys_monster is offline   Reply With Quote
Old 01-26-2016, 07:10 AM   #14
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,222
Default

Tutorial please !
vanhaze is offline   Reply With Quote
Old 02-07-2016, 05:50 AM   #15
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 340
Default

Hi guys. I haven't forgot about you. I'm putting together a tutorial as we speak. I made a video using LiceCAP and at first it was too slow and then I redid it with captions but they don't last enough. I need an editor. It's hard doing all this stuff live. Right now I'd make a terrible musician. LOL! :-D
Hypex is offline   Reply With Quote
Old 02-07-2016, 06:13 AM   #16
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,222
Default

Great , thx ; can't wait to see it !
vanhaze is offline   Reply With Quote
Old 05-20-2016, 09:41 AM   #17
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 7,610
Default

A video tutorial would still be very appreciated :P
Thanks !
X-Raym is offline   Reply With Quote
Old 05-20-2016, 12:15 PM   #18
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,222
Default

Errr, yes please !!!
vanhaze is offline   Reply With Quote
Old 05-20-2016, 02:29 PM   #19
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 6,394
Default

Quote:
Originally Posted by X-Raym View Post
A video tutorial would still be very appreciated :P
Thanks !
I volunteered to do one but didn't get it working well enough to do a tutorial.
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 10-09-2016, 01:15 PM   #20
Smart-Sound
Human being with feelings
 
Join Date: Feb 2012
Posts: 38
Default

What's up with video and tutorial, guys?)
Smart-Sound is offline   Reply With Quote
Old 10-22-2016, 01:33 AM   #21
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 340
Default

Hello again.

My sincere apologies for the lack of a tutorial. I have in fact did start putting one together. But then got stuck looking for a simple GIF anim editor. I went from OSX to Linux to Windows in desperation (in that order). Downloading allegedly free software to do some basic editing which always failed. Most software fell over itself when I fed it my GIF and simply crashed or locked up the system. Or did so when saving. I didn't know such a something simple was such a something hard to do.

So, that, along with updating and expanding my script and a long distance relationship I found my self in meant I couldn't finish the tutorial.

In any case, I found one solution was GifBuilder, a Carbon app for OSX PPC from way back in 2001! What a shocker. So this phantom tutorial will really be here soon. :-)
Hypex is offline   Reply With Quote
Old 10-22-2016, 03:44 AM   #22
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 7,759
Default

Quote:
Originally Posted by Hypex View Post
Hello again...
Use Licecap: http://cockos.com/licecap/ and then you can edit it as video in Reaper.
vitalker is online now   Reply With Quote
Old 10-22-2016, 06:42 AM   #23
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 340
Default

Quote:
Originally Posted by vitalker View Post
Use Licecap:
I did! I managed to load it into Reaper but from there couldn't see how to edit it. I looked up the docs on video editing but could see nothing about editing frames or timing so gave up on using Reaper to do it.

Well it's done now. Well my first attempt is. Link on bottom of opening post.
Hypex is offline   Reply With Quote
Old 10-22-2016, 08:42 AM   #24
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 7,759
Default

Quote:
Originally Posted by Hypex View Post
Well it's done now. Well my first attempt is. Link on bottom of opening post.
Yeah, I saw. Well what kind of editing do you need?
vitalker is online now   Reply With Quote
Old 10-23-2016, 02:15 AM   #25
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 340
Default

The editing I needed wasn't that complicated. I just needed to cut out selections of whole frames and change timing on some frames. Including being able to select and export frames as another anim. And in one rare case I did need to do some photo editing by copying a section of one frame to another to hide a mistake I made.

For the last one I started using Preview. But then found I couldn't change the paste cursor position so got out GIMP and had to learn how draw to a brush. Just to colour over a few pixels.

Had I used DPaint on my Amiga the process would have taken a few minutes. :-P
Hypex is offline   Reply With Quote
Old 07-25-2021, 10:18 AM   #26
juan_r
Human being with feelings
 
juan_r's Avatar
 
Join Date: Oct 2019
Posts: 387
Default

Reviving an old thread with my request (bounty offered).

https://forum.cockos.com/showthread.php?p=2466502
juan_r is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:19 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.