Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 01-08-2021, 06:23 AM   #1
razethestray
Human being with feelings
 
Join Date: Jul 2016
Posts: 2
Default [6.15] Tempo maps do not line up correctly when exported/imported via MIDI

Reaper 6.15. I have been using Reaper since v3 and this bug has always existed. Also exists on all operating systems I have used in that time, Windows 7, Windows 10 and several versions of Mac OS.

Start new project, 120bpm.
Add a tempo marker at (for example) bar 32, at 140bpm
Set the shape of the transition to 'Linear' so there is a linear tempo increase from 120bpm to 140bpm.
Add a track with a click source and render it so you have a wav file containing a click track that should match exactly with metronome.
Export project MIDI, with embedded tempo/time sig information.
Import media file and reimport the MIDI, importing the tempo map at 0:00:00
The wav click file (and any recorded audio in the project should you have done any) is no longer in sync with the metronome.

I've attached a project file showing before and after the re-import also.

I would expect an exported tempo map to reproduce the created tempo map when reimported. The same problem occurs when importing the MIDI into Pro Tools/other DAWS. This wastes so much of my time whenever I go to finish a record in a studio with Pro Tools as we have to recreate my tempo map from scratch. The engineer says he always has this problem when importing from Reaper, but never from Sonar/Cubase/Logic etc. Even if it didn't work into other DAWs at the very minimum I would expect to reliably coming back into Reaper.

I appreciate what the problem is - the data in the original project is continuous but after conversion to MIDI it becomes a collection of discrete data points. I understand this is how MIDI works. However, the fact that my engineer who deals with files from many different DAWs does not have this problem with any DAW outside Reaper shows that it can be fixed.
Attached Files
File Type: zip Tempo Map Bug.zip (99.2 KB, 84 views)
razethestray is offline   Reply With Quote
Old 01-08-2021, 06:35 AM   #2
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 12,205
Default

Thanks for posting the project files. We’ll take a look at whether this can be improved.
schwa is offline   Reply With Quote
Old 01-08-2021, 09:41 AM   #3
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 12,205
Default

This should be improved in the new +dev build, if you'd care to try it out.
https://forum.cockos.com/forumdisplay.php?f=37
schwa is offline   Reply With Quote
Old 01-08-2021, 04:45 PM   #4
razethestray
Human being with feelings
 
Join Date: Jul 2016
Posts: 2
Default

Hello! I've tried the dev build, and I am very happy to report that it is vastly improved.

On the example project I sent, it was absolutely perfect.

On a project I have that is extremely complicated and has some quite extreme changes, I could see it had drifted ever so slightly from looking at it visually, but within a few milliseconds. To all intents and purposes, listening to the click it was correct.

I'm a developer myself and have worked with MIDI quite a bit before, so I appreciate absolute perfection in all scenarios is probably not possible. I am however, extremely satisfied with this fix, and I know my engineer friend will be also.

Many thanks for addressing this so promptly, and I look forward to seeing it in and upcoming release!
razethestray is offline   Reply With Quote
Old 01-08-2021, 05:10 PM   #5
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 12,205
Default

Thanks for testing it! You’re correct that it will never be sample-correct due to, essentially, midi jitter, but I’m glad it’s improved.
schwa is offline   Reply With Quote
Old 01-08-2021, 08:51 PM   #6
dug dog
Human being with feelings
 
Join Date: Jan 2009
Location: Ontario Canada
Posts: 1,510
Default

Quote:
Originally Posted by schwa View Post
I’m glad it’s improved.

Me, too!
dug dog is online now   Reply With Quote
Old 01-08-2021, 09:03 PM   #7
EcBaPr
Human being with feelings
 
Join Date: Aug 2009
Posts: 296
Default

Quote:
Originally Posted by razethestray View Post
This wastes so much of my time whenever I go to finish a record in a studio with Pro Tools as we have to recreate my tempo map from scratch.
I have a similar scenario.. I often import midi tempo maps with rendered audio into larger projects.. the problem is when you import a file with tempo markers it wipes out all other tempo markers that you have set after the position where you insert the midi file.. it assumes the last tempo from the midi file should now apply to the rest of the timeline.

would it be possible to make an imported tempo map only apply to the timeline for the length of the imported midi file itself, and not erase other tempo markers that follow ?
EcBaPr is offline   Reply With Quote
Old 02-01-2021, 06:05 AM   #8
jrk
Human being with feelings
 
Join Date: Aug 2015
Posts: 1,929
Default

Quote:
Originally Posted by razethestray View Post
Hello! I've tried the dev build, and I am very happy to report that it is vastly improved.
I reproduced your example (Reaper v6.21) and found a slight drift even over 32 bars. It's pretty small (5ms) but this is still significant, and will most likely be longer (and/or variable) for real-life projects.

I'm not 100% convinced that Reapers "discretization" of these gradual tempo changes is correct. As a demonstration / experiment I've cobbled together an EEL script which you can try before exporting midi. It replaces tempo "ramps" with a bunch of discrete (square) markers. It opens a console window to report the timeshift of the last marker (ideally, this would be zero).

Even when creating fewer markers than the native mechanism, it seems to be more accurate.

If you'd like to test it, it's on the stash:
https://stash.reaper.fm/v/41247/JRK_...o_Map_v0_6.eel

Cheers!
__________________
it's meant to sound like that...

Last edited by jrk; 02-02-2021 at 02:05 PM.
jrk is offline   Reply With Quote
Old 02-03-2021, 05:27 PM   #9
jrk
Human being with feelings
 
Join Date: Aug 2015
Posts: 1,929
Default

This looks like it's totally fixed in v6.21+dev0201
Fingers crossed it makes it into 6.22
... and in 6.22rc1 Great stuff Devs!
__________________
it's meant to sound like that...

Last edited by jrk; 02-04-2021 at 05:03 AM.
jrk 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 10:21 AM.


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