<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Modartt user forum - MIDI RPN fine tuning not recognized]]></title>
		<link>https://forum.modartt.com/viewtopic.php?id=3760</link>
		<description><![CDATA[The most recent posts in MIDI RPN fine tuning not recognized.]]></description>
		<lastBuildDate>Thu, 22 Jan 2015 16:37:55 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[MIDI RPN fine tuning not recognized]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=936932#p936932</link>
			<description><![CDATA[<p>Hello<br />When I send MIDI RPN message, for fine and/or coarse tuning, Pianoteq does not react ( the 440Hz tuning is not changed )...<br />In the MIDI standard ( <a href="http://www.midi.org/techspecs/midimessages.php">http://www.midi.org/techspecs/midimessages.php</a> ),&nbsp; RPN is use to set the tuning.<br />Is it possible to implement it ?<br />I can&#039;t see a way to set this RPN message in the Painoteq MIDI settings.</p><p>Regards<br />Franck</p><p>Example of calculation used to convert freq in Hz to these RPN values ( if useful .. ) :</p><p>&nbsp; &nbsp; int coarse, coarsemsb , finemsb ;<br />&nbsp; &nbsp; float fine;<br />&nbsp; &nbsp; &nbsp; &nbsp; // convert Hertz to cents<br />&nbsp; &nbsp; float cents = 1200.0 * log2f(freq / 440.0);</p><p>&nbsp; &nbsp; if (cents &gt;= 0)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; coarse = (int)((cents + 50.0)/100.0); // semitone<br />&nbsp; &nbsp; &nbsp; &nbsp; fine = cents - 100.0 * (float)(coarse); // cents<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; else<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; cents = (-1.0)*cents;<br />&nbsp; &nbsp; &nbsp; &nbsp; coarse = (int)((cents + 50.0)/100.0);<br />&nbsp; &nbsp; &nbsp; &nbsp; fine = cents - 100.0 * (float)(coarse);<br />&nbsp; &nbsp; &nbsp; &nbsp; coarse *= -1;<br />&nbsp; &nbsp; &nbsp; &nbsp; fine *= -1.0;<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; coarsemsb = coarse + 0x40; // RPN coarse tuning <br />&nbsp; &nbsp; finemsb = (int)((float)(0x20) * fine / 50.0 ) + 0x40; // RPN fine tuning</p>]]></description>
			<author><![CDATA[null@example.com (franck.revolle)]]></author>
			<pubDate>Thu, 22 Jan 2015 16:37:55 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=936932#p936932</guid>
		</item>
	</channel>
</rss>
