Old 10-22-2016, 06:25 AM   #1
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 451
Default Introducing the ReaMix Beat Mapper Tutorial!

Hello everyone.

It's been a long time coming and it's finally here. A ReaMix Beat Mapper Tutorial for my semi-automatic beat mapping script that marks out a tempo map. Just to reprise your memory here is my brief introduction.

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 calculate 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.

Okay so now assuming you are familiar with it, working or not working, I'm going to guide you through an actual beat mapping session. This session is broken up into two parts. In the first I tempo map a song intro on the first track where a keyboard plays. In the second I navigate to the second track which holds a kick drum.

Before I begin I should provide a download link:
https://stash.reaper.fm/v/25127/ReaM...t%20Mapper.zip

Prerequisites:
The first is your transient settings. The mapper uses these to detect a beat. So you need to make sure these work within your track. If you were planning to use it with a kick drum then it's best to test tab on the track to see if it hits the mark and plants the cursor on each beat transient with the accuracy you need. And obviously detects the beats.

The second would be the timebase to be set so that the grid aligns to the tempo. Timebase for items/envelopes/markers set to Time. Timebase for tempo/time signature envelope set to Beats.

ReaMix Beat Mapper Tutorial:
So below is a short video of beat mapping in action. The following steps are performed. At each major step the video will pause and specify what is happening next. A project with tracks has already been loaded in.

1. First I set the project BPM and check the timebase.

2. So that I have a starting point I select the first bar in the song on the first track and use the Reaper menu item "Measure from time selection (detect tempo)" to tempo map the first bar. The bar also has a blank lead in but it is measured from actual start on timeline so as to not mess up the timing.

3. So now I'm ready to bring up the tool. First I clear any time selection and make sure the cursor is positioned from where I wish it to be mapped from, which it is here. I then bring up the ReaMix Beat Mapper window (assigned to my B key), the settings are ready to go, and I give it the OK. Here I've also left "Beats per Marker" at "4" since the song is 4/4 time and this will mark tempo every four beats, placing it on the start of every bar. This also means the window the beat detection will look in will sit on or around the first beat of every bar

4. The keyboard is beat mapped until it fades out on that section. There is a miss but this section has been mapped so that is fine. And we see the results.

5. So next I move on to track two and the kick drum. I select the track and tab to the first kick transient. Also here no time selection is marked since I want it to map the entire track from that cursor position.

6. I bring up the ReaMix Beat Mapper window again. The settings are fine also. So we let it rip. Or rather, let it map. :-)

7. Working until it reached the end it was a successful mapping and managed to mark tempo out for all the kicks on the first beat of every bar. In this case the whole song has been mapped now. And is now ripe for the remixing. Or any usual editing task. :-D

8. So now I give it a test and have a play. The BPM changes on every bar. Looks good. :-)



ReaMix Beat Mapper Mistake!
So what happens when things go wrong? Well here is an example of such. This is a short blooper reel. That will show you what to watch out for regarding the time selection. Here I messed up and forgot to clear the time selection when a bar was selected. The cursor was right at the end so it was hard to spot what was wrong.

9. So I bring up the mapper. All looks good. I give it the OK.

10. Oops! It had barely any time to work with. And failed instantly! :-P



In closing I hope this tutorial can help to show how to use my beat mapper. It may be the first of a few. If somehow my simple script can be too complicated for its own good. ;-)

Last edited by Hypex; 12-14-2022 at 09:45 PM.
Hypex is offline   Reply With Quote
Old 10-22-2016, 09:42 AM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Hi !

thanks for the tuts, and the sqcript !

just manage to make it works, and it works pretty well.
I don't know why analyses stop after a certain point (it didn't analyse the whole track), but the first 38s were good.

I think it could be a bit more flexible with the some settings, like not having to clean up the time selection for eg.

I would prefer it make the analysis between time selection only so that we can choose where the tempo marker will be placed (start and end). No need to move the edit cursor this way.
X-Raym is offline   Reply With Quote
Old 10-23-2016, 06:08 AM   #3
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 451
Default

Thanks X-Raym for your interest and glad you got it working.

Just looking at my code. I know I had trouble figuring out if a time range was set. From what I recall if range start and end weren't equal there was a range. But I also checked if range was greater than zero. If not then it scanned within the active item. So it looks like it scans the time selection if set or the active item. So that could explain why it stops.

I think I did it that way so either an item could be scanned or time selection. There was also that thread I opened about getting track length. Perhaps it was getting complicated and I chose those as the options. I think it's been a year since I wrote it. :-)

So funny as it is, the need to clear time selection is because of a feature, where it can scan the time selection. As to cursor position it should only need moving if it's outside time range. If inside it will set it to range start.

One thing I thought might be annoying is the cursor being snapped back to where it started after a mapping. Making it look like nothing happened. But I wanted to have it back where it was. I'm looking into changing behaviour for some of these things.

Since I used GetUserInputs() for my input GUI I was limited with options. Be good if it supported sliders, cycles or check marks but AFAIK it doesn't. So I tried not to over complicate it. I didn't want it so the user would have to enter 0 or 1 as numbers to turn things on and off. At this point a custom GUI would be needed. Or converting it to C/++ and compiling at as a native app with some other GUI used.
Hypex is offline   Reply With Quote
Old 12-31-2017, 11:11 AM   #4
memyselfandus
Human being with feelings
 
memyselfandus's Avatar
 
Join Date: Oct 2008
Posts: 1,598
Default

Neat!
memyselfandus is offline   Reply With Quote
Old 12-31-2017, 11:30 AM   #5
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

Quote:
The first is your transient settings
As semi-automatic it is nice solution and works good. But in real world tapping is probably more efficient way to get proper tempo (of course it is full-human-dependent). But AFAIK there is no script for "taps-to-tempomarkers converter" yet.
mpl is offline   Reply With Quote
Old 01-01-2018, 03:41 PM   #6
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Quote:
But AFAIK there is no script for "taps-to-tempomarkers converter" yet.
Have you tried using MIDI notes as input, convert to markers (SWS/BR: Create project markers from notes in selected MIDI items) and using Script: Mordi_Create tempo-map from markers.lua ?
X-Raym is offline   Reply With Quote
Old 01-02-2018, 01:50 AM   #7
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

^^ that seems a solution, but it doesn`t take into account time signatures.
mpl is offline   Reply With Quote
Old 01-02-2018, 06:12 AM   #8
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 451
Default

Quote:
Originally Posted by mpl View Post
As semi-automatic it is nice solution and works good. But in real world tapping is probably more efficient way to get proper tempo (of course it is full-human-dependent). But AFAIK there is no script for "taps-to-tempomarkers converter" yet.
Thanks mpl that's good to know. I was also thinking it was time for an update. But unless there are some new features for building a GUI from ReaScript it would need a rewrite in C.

I was thinking it would be good if it mapped things out then let you fine tune off beats as you go. With which it would adjust the rest of the map. So you kind of "paint" it on and when it's all correct hit the go button and it adds the tempo markers.

But in the meantime I found this guy who was looking for the same kind of thing tapping it out. He eventually found the classic tempo mapping 101 thread. And some other things.

https://forum.cockos.com/showthread.php?t=74549
Hypex 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 01:16 PM.


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