<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Modartt user forum - Simple batch export script for windows users]]></title>
		<link>https://forum.modartt.com/viewtopic.php?id=2326</link>
		<description><![CDATA[The most recent posts in Simple batch export script for windows users.]]></description>
		<lastBuildDate>Sun, 13 May 2012 18:40:13 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Simple batch export script for windows users]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=22112#p22112</link>
			<description><![CDATA[<p>For my specific use case, Red Dot Forever is less simple. I use a Roland HP-302 to record improvisation, so for me I just hit a button and go. Once I&#039;ve accumulated a few dozen midi files, I want to export to high quality WAV but not have to manually do it for each file, this is why I wrote this script. Maybe it will be useful to somebody out there.</p>]]></description>
			<author><![CDATA[null@example.com (derekandrews)]]></author>
			<pubDate>Sun, 13 May 2012 18:40:13 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=22112#p22112</guid>
		</item>
		<item>
			<title><![CDATA[Re: Simple batch export script for windows users]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=22106#p22106</link>
			<description><![CDATA[<p>Wouldn&#039;t it be easier to use Red Dot Forever? It captures your MIDI and saves it to a file. It start recording when you click the record button and stops when you click the stop button. Simple.</p>]]></description>
			<author><![CDATA[null@example.com (lhorwinkle)]]></author>
			<pubDate>Sun, 13 May 2012 17:48:04 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=22106#p22106</guid>
		</item>
		<item>
			<title><![CDATA[Simple batch export script for windows users]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=22093#p22093</link>
			<description><![CDATA[<p>Hi everyone,</p><p>I use Pianoteq PLAY to export dozens (and dozens) of piano improvisations that I record on a daily basis from my digital piano.</p><p>Since Pianoteq does not have batch export, I looked into writing a simple visual basic script to perform batch export. It uses the file open and the export functions. I could not get ctrl to work, so I changed the default key combinations to simply O and E. Here&#039;s the script once I changed the key combinations:</p><div class="codebox"><pre><code>Const ForReading = 1
Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
Set objTextFile = objFSO.OpenTextFile _
    (&quot;files.txt&quot;, ForReading)

set a=createobject(&quot;wscript.shell&quot;)
a.run(&quot;pianoteq&quot;)
wscript.sleep 10000

Do Until objTextFile.AtEndOfStream
    strNextLine = objTextFile.Readline

    a.sendkeys &quot;o&quot;
    a.sendkeys strNextLine
    a.sendkeys &quot;{ENTER}&quot;
    a.sendkeys &quot;e&quot;
    a.sendkeys &quot;{TAB}&quot;
    a.sendkeys &quot;{TAB}&quot;
    a.sendkeys &quot;{TAB}&quot;
    a.sendkeys &quot;{TAB}&quot;
    a.sendkeys &quot;{TAB}&quot;
    a.sendkeys &quot;{ENTER}&quot;
    wscript.sleep 60000
Loop</code></pre></div><p>Just put the above into a file called export.vbs. In Windows, you can double click such a file to cause it to execute. This script must have a file called &quot;files.txt&quot; in the same directory spelling out absolute paths to each midi file you wish to export. To create such a file, I usually use ls -1. I&#039;m not sure how I&#039;d do that in windows actually <i class="far fa-smile-beam smiley"></i> I use cygwin on top of windows...</p><p>sample files.txt:</p><p>&quot;C:\organize\recordings\midi\2011\2011 August 01 01.MID&quot;<br />&quot;C:\organize\recordings\midi\2011\2011 August 01 02.MID&quot;<br />&quot;C:\organize\recordings\midi\2011\2011 August 03 02.MID&quot;<br />&quot;C:\organize\recordings\midi\2011\2011 August 08 01.MID&quot;</p><br /><p>Anyway---the script is not very robust and needs a &quot;worst case&quot; wait time for each export. It is what I could do in the space of a couple of hours without really knowing vbscript very well. But, for my purposes it works great. Once I have a few dozen (or hundred) midi files I want to export to wav, I just get a list of the files and set this script running and by morning I have a huge pile of exported WAV files.</p><p>To cancel a script in windows, you must ctrl+alt+delete into the task manager and kill the wscript process.</p><p>Hopefully that ends up useful to somebody! Maybe there&#039;s already a better solution similar to this on this forum, I hadn&#039;t found one when I searched, though.</p>]]></description>
			<author><![CDATA[null@example.com (derekandrews)]]></author>
			<pubDate>Sun, 13 May 2012 01:03:40 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=22093#p22093</guid>
		</item>
	</channel>
</rss>
