<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Modartt user forum - MIDI RPN fine tuning not recognized]]></title>
	<link rel="self" href="https://forum.modartt.com/extern.php?action=feed&amp;tid=3760&amp;type=atom"/>
	<updated>2015-01-22T16:37:55Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.modartt.com/viewtopic.php?id=3760</id>
		<entry>
			<title type="html"><![CDATA[MIDI RPN fine tuning not recognized]]></title>
			<link rel="alternate" href="https://forum.modartt.com/viewtopic.php?pid=936932#p936932"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[franck.revolle]]></name>
				<uri>https://forum.modartt.com/profile.php?id=2408</uri>
			</author>
			<updated>2015-01-22T16:37:55Z</updated>
			<id>https://forum.modartt.com/viewtopic.php?pid=936932#p936932</id>
		</entry>
</feed>
