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

Reply
 
Thread Tools Display Modes
Old 01-21-2016, 02:17 PM   #1
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 615
Default MIDI export doesn't embed tempo (FIXED)

Exporting midi from Reaper will not embed tempo information even when the option has been selected. It will only embed the project tempo if there is at least one tempo marker in the project.

I see this as a bug because there doesn't exist a way to simply embed the tempo of the project in a midi file with no tempo markers. Meanwhile, exporting a midi file without tempo information is a function that appears to be "doubled up", as it can be achieved either with the option to embed tempo info not selected, or with it selected but with no tempo markers in the project.
Commala is offline   Reply With Quote
Old 01-21-2016, 02:29 PM   #2
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,681
Default

Known bug:
http://forum.cockos.com/showthread.php?t=163268
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 01-21-2016, 11:28 PM   #3
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 615
Default

Ah, don't remember seeing either of those threads. I noticed this a few weeks ago but just decided to post about it, and so it's amazing that I posted this exactly one year to the day from Studio1602's thread about it.

Maybe I read that thread last year but forgot. The subconscious at work?
Commala is offline   Reply With Quote
Old 01-28-2016, 01:36 PM   #4
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 615
Default

Edit: Nope, this bug is still occurring. My mistake. Thought it was cleared up for a minute

Last edited by Commala; 01-28-2016 at 05:46 PM.
Commala is offline   Reply With Quote
Old 02-09-2016, 06:25 PM   #5
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 615
Default

There has been some discussion in the 5.15 rc2 pre thread about holding ctrl to import simple tempo maps.

I don't know if that is the same issue that happens here: at first I thought that this bug was explained by my ignorance of needing to hold ctrl. But then I remembered that after exporting midi files and attempting to play them back in an exterior media player, the tempo would not be correct.

This makes me suspect that there is something wrong when Reaper actually exports the midi, not just user error on import.
Commala is offline   Reply With Quote
Old 02-10-2016, 01:47 AM   #6
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 24,798
Default

Simple tempo map export (=MIDI files have just a single tempo event) should be fixed now in 5.15 - I tested it and it works fine in external players now.

For the time being you will need to hold Ctrl to import a simple tempo map into Reaper, but hopefully this is going to change in 5.16 by obeying the "media with embedded tempo information" preference in Media->Video/REX/Misc... Fingers crossed!
EvilDragon is offline   Reply With Quote
Old 02-13-2016, 12:38 PM   #7
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 615
Default

Quote:
Originally Posted by EvilDragon View Post
Simple tempo map export (=MIDI files have just a single tempo event) should be fixed now in 5.15 - I tested it and it works fine in external players now.

For the time being you will need to hold Ctrl to import a simple tempo map into Reaper, but hopefully this is going to change in 5.16 by obeying the "media with embedded tempo information" preference in Media->Video/REX/Misc... Fingers crossed!
Thank you, I hadn't had an opportunity to check out the new pre actually.

But... Something funny is still going on. I exported midi at 70 bpm, and it imports at 75. Same file imports in Guitar Pro at 69 bpm. Then I exported a file at 80, and it imports correctly at 80, both in Reaper and GP

Could this have something to do with PPQ? Mine is set rather high
Commala is offline   Reply With Quote
Old 02-13-2016, 04:24 PM   #8
ELP
Human being with feelings
 
Join Date: Apr 2014
Posts: 943
Default

"I exported midi at 70 bpm, ...Same file imports in Guitar Pro at 69 bpm. Then I exported a file at 80, and it imports correctly at 80, both in Reaper and GP"

this has nothing to do with the ppqn.
I wanted to say for a long time why fp calculation for exporting microticks is not really
the optimal way
but I have always forget.

This has to do with the how REAPER calculated the microticks/quarter for export.
REAPER calculate with FP and use microticks=ceil(time/tempo).
And mostly all Hardware and it seams also GP use simple integer calculation for
showing the resulting BPM...(time/microticks)

And now the example for your 70 BPM.
REAPER microticks= 60.000.000/70 = ceil(857.142,857.....)
means rounding up
microticks per quarter=857.143 for export within the midifile

If GP and mostly all Hardware use simple integer calculation for viewing the tempo
that would result in 69 BPM instead of 70
BPM=int(60.000.000/857143) = 69

If REAPER would not rounding up things(int(time/tempo))
then the result would be
int(60.000.000/857142)=70 BPM

And for the 80 BPM ceil(60.000.000/80) = exact 750.000 microticks
So no rounds up

But both do not matter for the tempo The microticks are the same
only the visible BPM is of course false..
110.05 would for example result in 110.04
110 in 109 and so on and so on.

But a more compatible way would be integer calculation (or floor(x)) to calculate the
microticks for export/import instead of rounding up.

----------------------
EDIT:
and normally the right /spec way!!
microticks is integer, like all other MIDI values, so I should also calculate with simple int^^

Another example:
Hardware with one BPM display XXX plus 3 decimals
XXX,YYY BPM

REAPER should export 75,689 BPM to MIDI

60.000.000.000:75689=792.717,567....
ceil(792.717,567)

REAPER export 792.718 microticks/quarter

but should export 792.717 ;without ceil(x)
--
Import within above Hardware with 3 decimals for viewing BPM from microticks

int(60.000.000.000/792.718)=75688
BPM Display show:
BPM 75,688

int(60.000.000.000/792.717)=75689
BPM Display show:
BPM 75.689

....exported 75,689 BPM to microticks

BTW:
this has nothing special to do with Hardware or not:
rounding up BPM <> microticks is simply not correct.
All prog which rounding up BPM <> microticks do it wrong.
All prog which use integer or floor(x) do it right.. the compatible spec way

BPM 75.689

|Tempo | BPM=75 | micros\quarter=792718
Display 75,688

vs

|Tempo | BPM=75 | micros\quarter=792717
Display 75,689
__________________
I hope you can understand me? Without german beer my written english is always very bad, with beer it becomes unbearable!.
Less is more! To much limited the own creativity.

Last edited by ELP; 02-14-2016 at 03:53 AM.
ELP is offline   Reply With Quote
Old 02-15-2016, 08:04 PM   #9
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 615
Default

Your knowledge of the topic is extensive!

Somewhat lost on me, but illuminating nonetheless
Commala is offline   Reply With Quote
Old 02-16-2016, 12:17 AM   #10
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 24,798
Default

In any case, this is fixed in 5.16 pre.
EvilDragon is offline   Reply With Quote
Old 08-25-2016, 05:55 AM   #11
Colox
Human being with feelings
 
Join Date: Feb 2012
Location: Sweden
Posts: 1,206
Default

I was just searching for ways to export tempo maps through making a MIDI file, a MIDI file which hopefully would include the tempo changes my project has. And I found this thread.

But since I only want to export the tempo changes, Reaper tells me that MIDI exporting fails, because there is no MIDI information to export. I don't want no other data in the MIDI file than the tempo changes, so I just keep the master track selected (where the tempo changes are entered/edited), and set Reaper to export selected tracks only.

I go by File -> Export Project MIDI ... and set the export dialog as below:


By what I read above, this ought to work .. (?)
Or do I need to manually input tempo change data as LSB in a MIDI item?
__________________
There are only two kinds of people in the world: those who entertain, and those who are absurd.
- Britney Spears

Last edited by Colox; 08-25-2016 at 06:04 AM.
Colox is offline   Reply With Quote
Old 08-25-2016, 07:26 AM   #12
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,823
Default

Quote:
Originally Posted by Colox View Post
But since I only want to export the tempo changes, Reaper tells me that MIDI exporting fails, because there is no MIDI information to export.
The next prerelease build (probably available later today) will add support for exporting MIDI tempo maps and cues without any channel data.
schwa is offline   Reply With Quote
Old 08-25-2016, 07:58 AM   #13
Colox
Human being with feelings
 
Join Date: Feb 2012
Location: Sweden
Posts: 1,206
Default

Quote:
Originally Posted by schwa View Post
The next prerelease build (probably available later today) will add support for exporting MIDI tempo maps and cues without any channel data.
Oh? Superb!

In the meantime, I read further on the forum. And I learned that my ambition above will work IF you create a single MIDI item and just put 1 short note in there (probably best fit is at start, 1.1). Just for the record.
But, this seems to be deprecated info as soon as later today even.

Thx Schwa
__________________
There are only two kinds of people in the world: those who entertain, and those who are absurd.
- Britney Spears

Last edited by Colox; 08-25-2016 at 08:04 AM.
Colox 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 04:52 PM.


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