<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[midi per winmm.lib - timing problem]]></title><description><![CDATA[<p>hallo,<br />
ich arbeite mich gerade in die midi programmierung per low-level winmm ein. daten ausgeben per &quot;midiOutShortMsg()&quot; ist ja relativ simpel. ich möchte einen kleinen sequenzer bauen und komm da grad mit dem timing nicht weiter. wie kann ich noten mit einem &gt;stabielen&lt; timing versenden?<br />
wenn ich das einfach mit den systemtimern mache, z.B. so:</p>
<pre><code class="language-cpp">timeBeginPeriod(1);
	timer = timeGetTime() - startZeit;
	timeEndPeriod(1);

	if(timer &gt;= 200) {
		midiOutShortMsg(outHandle, 0x00403C90);
		timeBeginPeriod(1);
		startZeit = timeGetTime();
		timeEndPeriod(1);
	}
</code></pre>
<p>schwankt das timing der notenausgabe hörbar. Die Benutzung von &quot;QueryPerformanceCounter&quot; statt &quot;timeGetTime&quot; bringt zwar ein wenig, das timing ist aber dennoch nicht wirklich straight.</p>
<p>hat jemand ahnung, wie man in c++ (visual v++ 2005, winXP 32) einen stabilen timer programmieren kann?</p>
<p>ich wäre über antworten sehr dankbar, da ich ein wenig in zeitdruck stehe (studienprojekt).</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/215879/midi-per-winmm-lib-timing-problem</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 18:08:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/215879.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 Jun 2008 15:40:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to midi per winmm.lib - timing problem on Mon, 16 Jun 2008 15:40:16 GMT]]></title><description><![CDATA[<p>hallo,<br />
ich arbeite mich gerade in die midi programmierung per low-level winmm ein. daten ausgeben per &quot;midiOutShortMsg()&quot; ist ja relativ simpel. ich möchte einen kleinen sequenzer bauen und komm da grad mit dem timing nicht weiter. wie kann ich noten mit einem &gt;stabielen&lt; timing versenden?<br />
wenn ich das einfach mit den systemtimern mache, z.B. so:</p>
<pre><code class="language-cpp">timeBeginPeriod(1);
	timer = timeGetTime() - startZeit;
	timeEndPeriod(1);

	if(timer &gt;= 200) {
		midiOutShortMsg(outHandle, 0x00403C90);
		timeBeginPeriod(1);
		startZeit = timeGetTime();
		timeEndPeriod(1);
	}
</code></pre>
<p>schwankt das timing der notenausgabe hörbar. Die Benutzung von &quot;QueryPerformanceCounter&quot; statt &quot;timeGetTime&quot; bringt zwar ein wenig, das timing ist aber dennoch nicht wirklich straight.</p>
<p>hat jemand ahnung, wie man in c++ (visual v++ 2005, winXP 32) einen stabilen timer programmieren kann?</p>
<p>ich wäre über antworten sehr dankbar, da ich ein wenig in zeitdruck stehe (studienprojekt).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1530226</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1530226</guid><dc:creator><![CDATA[spudubi]]></dc:creator><pubDate>Mon, 16 Jun 2008 15:40:16 GMT</pubDate></item><item><title><![CDATA[Reply to midi per winmm.lib - timing problem on Mon, 16 Jun 2008 22:13:31 GMT]]></title><description><![CDATA[<p>Na, schlimmstenfalls nimmst du halt Sleep ().<br />
Ich nehme mal an, du hast eine Konsolenanwendung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1530461</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1530461</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 16 Jun 2008 22:13:31 GMT</pubDate></item></channel></rss>