Old 11-16-2016, 02:23 AM   #1
Human being with feelings
Join Date: Nov 2016
Posts: 1
Default Batch file converter ignores midi file tempo?

Hello everyone!
I have a large number of midi files and I want to batch render them through a VSTi and save them as audio. I try to use batch file/item converter to process them and the result seems correct except for the tempo. The converter seems to ignore the embedded tempo inside the midi tracks. Actually, it obeys the current open project's tempo - when I change this the output of the batch conversion changes too.
I am sure the midi files are of type 1 and contain tempo information because the Windows Media Player plays them correctly.
Is there a workaround for this? Am I doing some obvious mistake? Is this even possible?
Thanks in advance!
steste is offline   Reply With Quote
Old 07-02-2017, 12:15 PM   #2
Human being with feelings
Join Date: Nov 2016
Posts: 4

I've been trying the same thing and eventually settled for making a template RPP project (see attachment) in which I replace a few placeholders with a PHP script and then render that template.

This is the important section of the PHP script, you need http://valentin.dasdeck.com/php/midi/ for it:

$midi = new MidiDuration();
$midi->importMid($dir . "score.mid");
$rpp = file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'template.RPP');
$rpp = str_replace('{{LENGTH}}', $midi->getDuration(), $rpp);
$rpp = str_replace('{{BPM}}', $midi->getBpm(), $rpp);
file_put_contents($dir . "score.rpp", $rpp);
$reaper_batch =		$dir."score.rpp\n" .
	"<CONFIG\n" .
	"  <OUTFMT\n" . 
	"   RSMODE 9 0 1\n" . 
	"   DITHER 3\n" . 
	"   PAD_START 0.0\n" . 
	"   PAD_END 1000.0\n" . 
	"   OUTPATH "".$dir.""\n" .
	" >\n" . 
	file_put_contents($dir . "job.txt", $reaper_batch);
	system(""$reaper" -noactivate -batchconvert "" . $dir . "job.txt"");
Obviously you need to adjust the config to your preferences, but this might help a bit further.
Attached Files
File Type: rpp template.RPP (8.0 KB, 55 views)

Last edited by Tox; 07-02-2017 at 02:43 PM.
Tox is offline   Reply With Quote

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 12:56 AM.

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