<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Modartt user forum - CPU power and latency]]></title>
		<link>https://forum.modartt.com/viewtopic.php?id=3783</link>
		<description><![CDATA[The most recent posts in CPU power and latency.]]></description>
		<lastBuildDate>Fri, 27 Feb 2015 21:00:41 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: CPU power and latency]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=937369#p937369</link>
			<description><![CDATA[<p>Hi snowjoke,</p><div class="quotebox"><cite>snowjoke wrote:</cite><blockquote><p>groovy - thanks for posting your interesting findings. 16 ms seems like a large difference but I suspect it&#039;s mainly due to the time taken for the key to move.</p></blockquote></div><p>don&#039;t know, but I did a little crazy experiment 8-) that stops the time (of the key-move?):</p><p><span class="postimg"><img src="http://fs1.directupload.net/images/150227/w4o6piyn.jpg" alt="http://fs1.directupload.net/images/150227/w4o6piyn.jpg" title="http://fs1.directupload.net/images/150227/w4o6piyn.jpg"/></span></p><p>The idea was to press the button of my Korg nanoKONTROL and to move the key of my Kawai at the &quot;same&quot; time (thank you, wine-cork ;-)</p><p>The time-difference between the Controller 41 event of the button and the Note On event of the Kawai was around 19 ms and thus in the same league of the ~16 ms latency I estimated in my previous post. A &quot;measured&quot; example in Pianoteq&#039;s MIDI log:</p><p><span class="postimg"><img src="http://fs2.directupload.net/images/150227/zcxks7z5.png" alt="http://fs2.directupload.net/images/150227/zcxks7z5.png" title="http://fs2.directupload.net/images/150227/zcxks7z5.png"/></span></p><p>It seems, that nearly the half of my overall-latency results from the keyboard. And has nothing to do with the CPU Power of the laptop.</p><p>cheers</p>]]></description>
			<author><![CDATA[null@example.com (groovy)]]></author>
			<pubDate>Fri, 27 Feb 2015 21:00:41 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=937369#p937369</guid>
		</item>
		<item>
			<title><![CDATA[Re: CPU power and latency]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=937365#p937365</link>
			<description><![CDATA[<p>I mis-spoke.&nbsp; &nbsp;Lowering the latency will increase the DSP load.&nbsp; &nbsp;DSP is the fraction of CPU time used for audio processing in one audio buffer read cycle.&nbsp; &nbsp;If you reduce the latency there is less CPU time available for audio processing during read cycles are the DSP will approach 100%&nbsp; If it reaches 100% you will like hear audio glitches.</p>]]></description>
			<author><![CDATA[null@example.com (varpa)]]></author>
			<pubDate>Fri, 27 Feb 2015 17:11:25 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=937365#p937365</guid>
		</item>
		<item>
			<title><![CDATA[Re: CPU power and latency]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=937357#p937357</link>
			<description><![CDATA[<p>groovy - thanks for posting your interesting findings. 16 ms seems like a large difference but I suspect it&#039;s mainly due to the time taken for the key to move. Maybe I will do my own experiment to see if I get similar results (using Windows).</p><div class="quotebox"><cite>varpa wrote:</cite><blockquote><p>Latency is due to several factors and mostly does not depend you your CPU.&nbsp; The nominal latency is due to the configuration of you audio system (in Jack) which is given by&nbsp; (frames/period)*(Periods/buffer)/(sample rate)&nbsp; - using terminology of QJackCtl (since I notice you are using linux).&nbsp; &nbsp;Frames/period is what you call &quot;samples&quot;.&nbsp; &nbsp;There can be additional latency due the audio hardware itself.&nbsp; &nbsp;Anyway, latency is determined primarily by the settings you use according to the above formula.&nbsp; &nbsp; The CPU (and audio card) affect how low of a latency you can use before the hardware cannot keep up and you miss audio buffers reads (called xruns) which result in audible glitches.&nbsp; For live play you&#039;ll want to keep the latency to below roughly 10 msec to avoid a noticable delay between playing a note and hearing it.&nbsp; &nbsp; For sequencing/mixxing you can set the latency high to give more processing power for your sequencer.&nbsp; &nbsp;The DSP usage is the fraction of CPU time available used when processing audio frames (audio buffers reads).&nbsp; If it reaches 100% you will likely get xruns.&nbsp; &nbsp;Increasing latency will reduce the CPU load.&nbsp; &nbsp;If your computer does frequency scaling, make sure to set it to &quot;performance&quot; to reduce your DSP load.</p><p>A SSD will have (almost) no effect on Pianoteq.&nbsp; &nbsp;Well, Pianoteq would start up slightly faster.&nbsp; &nbsp;A SSD is useful if you are playing sampled pianos.</p></blockquote></div><p>varpa - thanks for your on-topic reply! So, buying a faster computer won&#039;t improve my latency, if my current machine can cope with the lowest buffer settings already.</p><p>When you say &quot;Increasing latency will reduce the CPU load&quot;, do you mean that processing of particularly intense moments can be spread out, hence peak load will be lower? The CPU needs to do the same amount of work whatever the latency, and you already said that latency doesn&#039;t depend on CPU power.</p>]]></description>
			<author><![CDATA[null@example.com (snowjoke)]]></author>
			<pubDate>Fri, 27 Feb 2015 01:41:31 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=937357#p937357</guid>
		</item>
		<item>
			<title><![CDATA[Re: CPU power and latency]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=937335#p937335</link>
			<description><![CDATA[<p>thanks varpa you just gave me the right direction where to fix the problem, just needed to install kernel-tools from the link below.</p><p><a href="http://rpm.pbone.net/index.php3/stat/4/idpl/28556731/dir/fedora_20/com/kernel-tools-3.14.29-200.rt26.1.fc20.ccrma.x86_64.rpm.html">http://rpm.pbone.net/index.php3/stat/4/...4.rpm.html</a></p><br /><p>Now everything works way better, and i am pretty happy <i class="far fa-laugh smiley"></i> Thank you, made my day !</p>]]></description>
			<author><![CDATA[null@example.com (Beerhunter)]]></author>
			<pubDate>Wed, 25 Feb 2015 16:19:23 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=937335#p937335</guid>
		</item>
		<item>
			<title><![CDATA[Re: CPU power and latency]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=937324#p937324</link>
			<description><![CDATA[<p>There are command line utilities to control CPU like cpufreq.&nbsp; &nbsp;Probably there are an applet you can use in gnome3.&nbsp; &nbsp;Google is your friend.</p>]]></description>
			<author><![CDATA[null@example.com (varpa)]]></author>
			<pubDate>Wed, 25 Feb 2015 03:06:54 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=937324#p937324</guid>
		</item>
		<item>
			<title><![CDATA[Re: CPU power and latency]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=937321#p937321</link>
			<description><![CDATA[<p>@ Varpa do you have any idea how to scale the CPU frequency under gnome 3 ? Fedora 20 with gnome 3 is the OS... </p><p>@ groovy, as far as i know you´re right</p><br /><p>thank you <i class="far fa-smile smiley"></i></p>]]></description>
			<author><![CDATA[null@example.com (Beerhunter)]]></author>
			<pubDate>Tue, 24 Feb 2015 21:01:25 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=937321#p937321</guid>
		</item>
		<item>
			<title><![CDATA[Re: CPU power and latency]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=937318#p937318</link>
			<description><![CDATA[<div class="quotebox"><cite>varpa wrote:</cite><blockquote><p>Latency is due to several factors and mostly does not depend you your CPU.&nbsp; The nominal latency is due to the configuration of you audio system (in Jack) which is given by&nbsp; (frames/period)*(Periods/buffer)/(sample rate)&nbsp; - using terminology of QJackCtl (since I notice you are using linux).&nbsp; &nbsp;Frames/period is what you call &quot;samples&quot;.&nbsp; &nbsp;There can be additional latency due the audio hardware itself.</p></blockquote></div><p>Assuming JACK audio server daemon is running with these options: </p><p>&#039;jackd -dalsa -p128 -n3 -r44100&#039;</p><p>(frames/period)*(Periods/buffer)/(sample rate)</p><p>128 * 3 / 44100/s = 8.7 ms</p><p>Is the calculated &quot;latency&quot; of 8.7 ms correct then?</p><p>Is it the latency between the modelled tone and its entry into the audio-hardware? In other words, is 8.7 ms the time spent in JACK audio server until a sample from pianoteq reaches the audio card?</p><p>Thanks</p>]]></description>
			<author><![CDATA[null@example.com (groovy)]]></author>
			<pubDate>Tue, 24 Feb 2015 14:10:37 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=937318#p937318</guid>
		</item>
		<item>
			<title><![CDATA[Re: CPU power and latency]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=937317#p937317</link>
			<description><![CDATA[<p>Latency is due to several factors and mostly does not depend you your CPU.&nbsp; The nominal latency is due to the configuration of you audio system (in Jack) which is given by&nbsp; (frames/period)*(Periods/buffer)/(sample rate)&nbsp; - using terminology of QJackCtl (since I notice you are using linux).&nbsp; &nbsp;Frames/period is what you call &quot;samples&quot;.&nbsp; &nbsp;There can be additional latency due the audio hardware itself.&nbsp; &nbsp;Anyway, latency is determined primarily by the settings you use according to the above formula.&nbsp; &nbsp; The CPU (and audio card) affect how low of a latency you can use before the hardware cannot keep up and you miss audio buffers reads (called xruns) which result in audible glitches.&nbsp; For live play you&#039;ll want to keep the latency to below roughly 10 msec to avoid a noticable delay between playing a note and hearing it.&nbsp; &nbsp; For sequencing/mixxing you can set the latency high to give more processing power for your sequencer.&nbsp; &nbsp;The DSP usage is the fraction of CPU time available used when processing audio frames (audio buffers reads).&nbsp; If it reaches 100% you will likely get xruns.&nbsp; &nbsp;Increasing latency will reduce the CPU load.&nbsp; &nbsp;If your computer does frequency scaling, make sure to set it to &quot;performance&quot; to reduce your DSP load.</p><p>A SSD will have (almost) no effect on Pianoteq.&nbsp; &nbsp;Well, Pianoteq would start up slightly faster.&nbsp; &nbsp;A SSD is useful if you are playing sampled pianos.</p>]]></description>
			<author><![CDATA[null@example.com (varpa)]]></author>
			<pubDate>Mon, 23 Feb 2015 20:53:43 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=937317#p937317</guid>
		</item>
		<item>
			<title><![CDATA[Re: CPU power and latency]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=937315#p937315</link>
			<description><![CDATA[<p>AFAIK, an SSD would not have any influence with PianoTeq: everything is done in RAM.</p>]]></description>
			<author><![CDATA[null@example.com (Luc Henrion)]]></author>
			<pubDate>Mon, 23 Feb 2015 19:02:33 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=937315#p937315</guid>
		</item>
		<item>
			<title><![CDATA[Re: CPU power and latency]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=937312#p937312</link>
			<description><![CDATA[<p>Hi guys, i was just wondering if anyone of you could tell me how high the DSP load is while you´re using Pianoteq v5 ?</p><p>I got about 25-50% on my maschine, which is the Xeon 1230v3 @ 3.3ghz,8GB of RAM, on an HDD using low latency kernel on fedora 20 with an Focusrite 18i20 USB.</p><p>The overall latency of Jack is set to 256 samples so 11.6ms. any suggestions to lower the CPU usage ?<br />Bitwig Studio is the host.</p><p>Would you recommend using an SSD instead of the HDD ?</p><p>Thanks <i class="far fa-laugh smiley"></i></p>]]></description>
			<author><![CDATA[null@example.com (Beerhunter)]]></author>
			<pubDate>Mon, 23 Feb 2015 18:13:57 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=937312#p937312</guid>
		</item>
		<item>
			<title><![CDATA[Re: CPU power and latency]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=937263#p937263</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>The remaining unknown variables are the latency for processing a tone and the MIDI-signalling via USB from my Kawai to the subnotebook (Celeron N2930).</p></blockquote></div><p>I have an estimation for the &quot;unknown variables&quot; eventually. I don&#039;t know, how to measure it exactly, but I compared the note-on-latency of my USB-keyboard with the fastest midi-keyboard I have: the virtual-keyboard inside pianoteq clicked with an USB-mouse! <i class="far fa-smile-wink smiley"></i></p><p>From the noise of the mouseclick to the sound from the speaker I measured ~19 ms (average of five clicks). Example:</p><p><span class="postimg"><img src="http://fs1.directupload.net/images/150218/5mk96bm6.png" alt="http://fs1.directupload.net/images/150218/5mk96bm6.png" title="http://fs1.directupload.net/images/150218/5mk96bm6.png"/></span></p><p>And then I repeated the same with my Kawai ES3 connected to the subnotebook with an USB-cable. The average response from 5 hits (forte) was ~35 ms. Example:</p><p><span class="postimg"><img src="http://fs2.directupload.net/images/150218/7mdredfl.png" alt="http://fs2.directupload.net/images/150218/7mdredfl.png" title="http://fs2.directupload.net/images/150218/7mdredfl.png"/></span></p><br /><p><strong>So triggering a midi note-on from my USB-keyboard lasts ~16 ms longer than triggering a note from the virtual-keyboard with my USB-mouse (on my system).</strong></p><p>EDIT: Assumed that my overall latency is ~35 ms and ~19 ms&nbsp; is the best overall latency I can achieve with the virtual-keyboard, then ~16 ms&nbsp; are needed just to produce the midi-on-event in pianoteq with my real USB-keyboard.</p><p>Why is the virtual keyboard ~16 ms faster? Using the real keyboard the (USB) midi-signal has to pass the snd_usb_audio kernelmodule (&quot;driver&quot;) on the notebook. Plus the mouse button has a shorter contact-distance than a key. Plus unknown initial latency for midi-note-processing inside the Kawai.</p><p>The only parameter that could be influenced is the performance of the snd_usb_audio &quot;driver&quot;. With older 2.6x-linuxkernels there was an option &#039;nrpacks&#039; for example, that could be reduced from 8 to 1, and this shorter chunks improved USB-latency. In newer kernels, like my 3.16x from this experiment, nrpacks is obsolete now and handled automatically AFAIK. BTW, does someone know, if USB-latency can be tweaked somehow nowadays in 3.x-kernels?</p><p>cheers</p><p>PS: Keep in mind, that the overall latency of course is influenced by the speed of the keypress. Hitting my test-key with ff I saw latencies down to 30 ms (rather than ~35 ms)</p>]]></description>
			<author><![CDATA[null@example.com (groovy)]]></author>
			<pubDate>Wed, 18 Feb 2015 23:13:16 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=937263#p937263</guid>
		</item>
		<item>
			<title><![CDATA[Re: CPU power and latency]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=937151#p937151</link>
			<description><![CDATA[<div class="quotebox"><cite>galuwen wrote:</cite><blockquote><p>I also tested this and found out that with latest release of ASIO4all you can get a latency of around 10-12ms. The only Thing &gt; my System is new and &quot;clean&quot; :-).</p><p>Alexander</p></blockquote></div><p>Hi,</p><p>hm, I suspect this a little, because I have not seen such al low latency in the forum with that microphone-test before. I used Pianoteq 5.1.4, D4 (daily practise), no effects, the 3rd upper c-note on an 88-keyboard. - You do not mean &quot;10-12 ms&quot; in PTQ&#039;s preferences, right?</p>]]></description>
			<author><![CDATA[null@example.com (groovy)]]></author>
			<pubDate>Wed, 11 Feb 2015 07:21:35 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=937151#p937151</guid>
		</item>
		<item>
			<title><![CDATA[Re: CPU power and latency]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=937150#p937150</link>
			<description><![CDATA[<div class="quotebox"><cite>snowjoke wrote:</cite><blockquote><p>Thanks for your reply, groovy. Could you by any chance repeat the test using your Kawai&#039;s internal sounds, to compare?</p></blockquote></div><p>Hello snowjoke,</p><p>I tested it a long time ago and got 22 ms from a Kawai ES3 alone, see: </p><p><a href="http://www.forum-pianoteq.com/viewtopic.php?pid=8593#p8593">http://www.forum-pianoteq.com/viewtopic...8593#p8593</a></p>]]></description>
			<author><![CDATA[null@example.com (groovy)]]></author>
			<pubDate>Wed, 11 Feb 2015 07:11:16 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=937150#p937150</guid>
		</item>
		<item>
			<title><![CDATA[Re: CPU power and latency]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=937148#p937148</link>
			<description><![CDATA[<p>Compared with my CA95 I can state that in the higher range you can hear a &quot;delay&quot;, but playing a short period of time you get used to the little delay in my opinion.</p><p>I have to Point out, that with my Core i7 machine and Asio4all I can&#039;t hear any delay and can Combine both sounds to one suberb &quot;mix Sound&quot;.</p><p>Alexander</p>]]></description>
			<author><![CDATA[null@example.com (galuwen)]]></author>
			<pubDate>Tue, 10 Feb 2015 23:11:05 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=937148#p937148</guid>
		</item>
		<item>
			<title><![CDATA[Re: CPU power and latency]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=937147#p937147</link>
			<description><![CDATA[<p>Thanks for your reply, groovy. Could you by any chance repeat the test using your Kawai&#039;s internal sounds, to compare?</p>]]></description>
			<author><![CDATA[null@example.com (snowjoke)]]></author>
			<pubDate>Tue, 10 Feb 2015 23:04:44 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=937147#p937147</guid>
		</item>
	</channel>
</rss>
