<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Qball's Weblog &#187; Music</title>
	<atom:link href="http://blog.sarine.nl/category/music/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sarine.nl</link>
	<description>Beati pauperes spiritu</description>
	<lastBuildDate>Tue, 17 Jan 2012 20:33:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Quality of soundcards</title>
		<link>http://blog.sarine.nl/2008/12/21/quality-of-soundcards/</link>
		<comments>http://blog.sarine.nl/2008/12/21/quality-of-soundcards/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 18:56:33 +0000</pubDate>
		<dc:creator>Qball</dc:creator>
				<category><![CDATA[mpd]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://blog.sarine.nl/?p=295</guid>
		<description><![CDATA[I often make the remark that soundcards in laptops/motherboards are bad. F.e. I say &#8220;It does not perform better then 12 bit&#8221;. What I mean by this is the following: If you turn an analog signal into a digital signal, you introduce errors, because you only have X defined levels, not infite as with analog. <a href="http://blog.sarine.nl/2008/12/21/quality-of-soundcards/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I often make the remark that soundcards in laptops/motherboards are bad.</p>
<p>F.e. I say &#8220;It does not perform better then 12 bit&#8221;.</p>
<p>What I mean by this is the following:</p>
<p>If you turn an analog signal into a digital signal, you introduce errors, because you only have X defined levels, not infite as with analog.</p>
<p>So the more bits you have, the more levels you have, the less noise you introduce. The error that you make is 1/2 an LSB (least significant bit).  Any noise in the system larger then this 1/2 LSB can cause that the outputted value does not represent your input value.</p>
<p>This gives you a maximum noise your system may have if you want to output X bit signal. (It must be smaller then 1/2 a step, so in 8bit (256 levels) your noise should be lower then 1/512 of the maximum value)</p>
<p>So if your soundcard has a -80dB SNR (signal to noise) you can calculate  how many bits this can maximal represent, any more bits will be &#8220;lost&#8221; in the noise.</p>
<p>A rule of thumb is: ENOB = (SNR(dB) &#8211; 1.76)/6.02 (f.e. see Intergrated converters by Paul G.A. Jespers).</p>
<p>So if you have the 80dB SNR you can represent an ENOB(exact number of bits) of almost 13 bits.  Any more bits, are smaller then the noise and cannot be represented.</p>
<p>If you look at a common onboard soundcard spec, you get an SNR of the 86db, so 14 bit. But this is static, your dynamic performance is often even worse.</p>
<p>For example the realtek ALC850 Chip (used on older asus motherboards) has an SNR of 86dB, 14 bit. But it dynamic performance is 70dB, that is only 11bit! In real life it might be even worse, because noise from your PSU is also added, this realtek supresses the noise by only 40dB.</p>
<p>To compare, to correctly represent a CD you need 98dB SNR static and dynamic.</p>
<p>This, in short and with some simplifications, is why most onboard soundcards suck.</p>
<p>So if your resampler makes -80dB noise, with this soundcard, you hardly need to care about it.</p>
<p>Q</p>
<p>p.s. To get the more correct full picture, I advice you to get a good book on ADDA converters. like the one by Jespers.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sarine.nl/2008/12/21/quality-of-soundcards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dmix, the pain  or MPD High cpu usage</title>
		<link>http://blog.sarine.nl/2008/12/21/dmix-the-pain-or-mpd-high-cpu-usage/</link>
		<comments>http://blog.sarine.nl/2008/12/21/dmix-the-pain-or-mpd-high-cpu-usage/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 11:22:20 +0000</pubDate>
		<dc:creator>Qball</dc:creator>
				<category><![CDATA[mpd]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://blog.sarine.nl/?p=294</guid>
		<description><![CDATA[At mpd we are having an issue with high cpu usage, this started when alsa decided to use the great dmix by default. We now know this is caused by resampling. I never hit this problem and kind of assumed that the soundcards it happens on only supported 48khz sample rate. (with some crappy old <a href="http://blog.sarine.nl/2008/12/21/dmix-the-pain-or-mpd-high-cpu-usage/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At mpd we are having an issue with high cpu usage, this started when alsa decided to use the great dmix by default. We now know this is caused by resampling. I never hit this problem and kind of assumed that the soundcards it happens on only supported 48khz sample rate. (with some crappy old on-board soundcards this is the case).<br />
But currently a lot of crappy onboard cards support 44.1khz up to 192khz and 24bit audio. (support the format, not that they actually can reproduce this quality, they don&#8217;t even do cd-quality).</p>
<p>So why high cpu usage playing back music (44.1khz) on a card that supported 44.1khz?<br />
Well a quick look in &#8220;/proc/asound&#8221;</p>
<pre>cat /proc/asound/card0/pcm0p/sub0/hw_params</pre>
<p>Showed that the card was in 48khz mode, why?.<br />
After some googling i found this <a href="http://alsa.opensrc.org/index.php/Dmix#Does_dmix_affect_sound_quality.3F">link</a></p>
<p>I quote:<br />
Dmix by default uses 48kHz sample rate.<br />
What? lets read this again:</p>
<p>Dmix by default uses 48kHz sample rate.<br />
ok it really sais it. So even if you are playing 44.1khz sound, on a card that supports 44.1khz it resamples it to 48khz. That is bad.</p>
<p>Why is resampling bad? well 2 things:<br />
1. It is lossy, espicialy  44.1-&gt;48khz as it is irrational conversion. (see your favorite DSP book)<br />
2. It takes lot of cpu. The better you want the conversion, the more cpu it takes. The internal resampler of alsa does not use a lot of cpu, but is terrible. If you let mpd resample using libsamplerate it will cost you 10-30% cpu. depending on your machine.</p>
<p>So how to solve it?</p>
<p>There are several solutions, 2 are obvious:<br />
1. Let mpd bypass dmix.  You can do this by setting plughw:0,0 (for the first soundcard, first output). However if mpd is playing, nothing can else can use the soundcard. You don&#8217;t have mixing anymore. (unless your soundcard supports this in hardware)</p>
<p>2. Force dmix to use 44.1khz.</p>
<p>Lets see the inpack of all this by setting up a test case on my aspire one laptop:</p>
<p>The souncard supports (following /etc/asound/card0/codec#0) 44.1khz to 192khz for 16,20 and 24 bits. So 44.1khz playback should not be a problem, great.</p>
<p>So lets install mpd (I took the latest snapshot from git), use default config (I haven&#8217;t changed anything) and play some music (a 44.1khz 16bit flac rip from the album &#8220;slowhand&#8221; by &#8220;Eric Clapton&#8221;).</p>
<p>A quick look in /proc/asound/card0/pcm0p/sub0/hw_params showed that I was playing 32bit 48khz. (From the 32bit only the highest 24bits are used, for more explanation about this see the alsa documentation).</p>
<p>My cpu usage is 4-8%.    I cannot judge quality, this soundcard actual performance  is around 12-13bits. So any imperfections I hear are the soundcard, not the resampling.</p>
<p>Now this uses the bad crapppy internal resampler of alsa, so let mpd resample. This can be done by setting auto_resample &#8220;no&#8221; in my alsa audio_output block. I do have lsr installed, and use the default settings.</p>
<p>New cpu usage is 12-17%.</p>
<p>But the real solution in this case would be to stop the resampling.  Because I still want to be able to &#8220;mix&#8221; sounds. So lets try solution 2;  trie to change dmix default sample rate.</p>
<p>This is done by adding the following to my /etc/asound.conf</p>
<blockquote><p>pcm.!default {<br />
type plug<br />
slave.pcm {<br />
type dmix<br />
ipc_key 1024<br />
slave {<br />
pcm &#8220;hw:0,0&#8243;<br />
rate 44100<br />
}<br />
}<br />
}</p></blockquote>
<p>This should make my dmix play at 44.1khz. Lets restart mpd (yes this is required somehow) and play a song, checking /proc/asound/.. entry showed it was actually playing at 44.1khz GREAT!.</p>
<p>The cpu usage is now dropped to 1-2 % on a intel atom running at 800mhz. That is a massife improvement. And you did not loose sound quality this time.</p>
<p>There is a negative side to this solution, trying to play 48khz audio, it will be down-sampled to 44.1khz. This happens when playing a dvd.</p>
<p>I don&#8217;t mind, if I play a dvd (that has 48khz audio), I can either bypass dmix, or resample. The quality loss is not what I care about when watching a movie, I cannot even hear it on this crappy soundcard. The extra cpu usage is also not an issue, as the cpu is under a greater load by the playback of the video.</p>
<p>I hope this explains (and help solve) the high-cpu usage problem with mpd.</p>
<p>Q</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sarine.nl/2008/12/21/dmix-the-pain-or-mpd-high-cpu-usage/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Beryl</title>
		<link>http://blog.sarine.nl/2007/02/02/beryl/</link>
		<comments>http://blog.sarine.nl/2007/02/02/beryl/#comments</comments>
		<pubDate>Fri, 02 Feb 2007 22:35:55 +0000</pubDate>
		<dc:creator>Qball</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://wordpress.qballcow.nl/2007/02/02/beryl/</guid>
		<description><![CDATA[I&#8217;ve tried beryl today on my laptop. At first it didn&#8217;t work, segfaults kind of fun. After searching the web a little I found out that todays update broke beryl for fglrx. So one downgrade later I had everything running.Â  There is only one thing I can sayÂ  WOW! It really is improved since the <a href="http://blog.sarine.nl/2007/02/02/beryl/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve tried beryl today on my laptop.</p>
<p>At first it didn&#8217;t work, segfaults kind of fun. After searching the web a little I found out that todays update broke beryl for fglrx. So one downgrade later I had everything running.Â  There is only one thing I can sayÂ  <a href="http://www.showusyourwow.com">WOW</a>! It really is improved since the last time I tried it..</p>
<p>It doesn&#8217;t crash every 3 minutes anymore, if it does crash it nicely starts metacity for you.</p>
<p>The beryl setting manager is allot better.</p>
<p>From what I&#8217;ve seen, this can compete with vista&#8217;s &#8220;<a href="http://www.showusyourwow.com">WOW</a>&#8221; easily.Â  Seeing your window go up in fire is just fancy.Â  Or when rotating the &#8220;cube&#8221; looking against the back of playing dvd is show-off on the highest level. <strong>But</strong> &#8230;&#8230;</p>
<p>Yes, there is a but, there always is. I can&#8217;t see how people can get work done with all these animations and effects, they take so much time, and distract.Â  I&#8217;ve spend some time trimming the settings done to something workable.</p>
<p>This left me with just a few things enabled:</p>
<p>1. Alt-tab behavior. Seeing small preview windows is useful, it provides extra visual clues that helps you pick the right one fast..</p>
<p>2. Expose (scale it&#8217;s called I think). Same as for 1.</p>
<p>3. The cube.Â  Switching workspace is often done when switching from one task to another. Then the extra time it costsÂ  isn&#8217;t a big problem.</p>
<p>One other plugin I found useful is the Opasify plugin. If you hoover your mouse above a partially exposed window, it will make the other windows transparent, allowing you to view the content of that window.Â  It&#8217;s triggered from time to time when you don&#8217;t want it, but overall usefull.</p>
<p>I saw in the beryl setting manager that dualscreen is supported. So I might install my desktop pc (when I have time) with a 32bit linux to give it a try.</p>
<p><strong>Norah Jones &#8211; Not Too Late</strong></p>
<p>As IÂ  blogged last time, I&#8217;ve bought this cd. Now that I listened to it some more, I find it harder and harder to give a real opinion about it.Â  I am starting to love a few songs, but others I constantly skip because I dislike them. I didn&#8217;t had that before with a N. Jones album. I wish she sang more Jazzy stuff.</p>
<p>Q.</p>
<p>p.s. I found out today on the ubuntu forums that my harddisk crashed a month ago, and that caused the gmpc development to slow down. It&#8217;s nice that I am finally aware of this, now to find that harddisk.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sarine.nl/2007/02/02/beryl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Not too late</title>
		<link>http://blog.sarine.nl/2007/01/26/not-too-late/</link>
		<comments>http://blog.sarine.nl/2007/01/26/not-too-late/#comments</comments>
		<pubDate>Fri, 26 Jan 2007 15:50:40 +0000</pubDate>
		<dc:creator>Qball</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://wordpress.qballcow.nl/2007/01/26/not-too-late/</guid>
		<description><![CDATA[I&#8217;ve bought the new album from Norah Jones today: &#8220;Not Too Late&#8221; Like always it&#8217;s a pleasure to listen to, again and again. Her voice is simply beautiful, there is no need to polish it using a computer (Like they do with most artist from the hit lists). Having that said, I am not a <a href="http://blog.sarine.nl/2007/01/26/not-too-late/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve bought the new album from Norah Jones today: &#8220;Not Too Late&#8221;</p>
<p><img src="http://www.norahjones.com/Merchant2/graphics/en-US/mmui/nottoolate_lg.jpg" /></p>
<p>Like always it&#8217;s a pleasure to listen to, again and again. Her voice is simply beautiful, there is no need to polish it using a computer (Like they do with most artist from the hit lists).</p>
<p>Having that said, I am not a big fan of the direction her music is taking. It is getting more and more &#8216;pop&#8217; and less &#8216;Jazzy&#8217;, but that is just a matter of taste.</p>
<p>Today I&#8217;ve been also enjoying <a href="http://www.lizzwright.net/">Lizz Wright</a>, this is also an amazing singer. In my opinion she can easily compete with Norah Jones. But she isn&#8217;t very known.</p>
<p>Her second album is allot betterÂ  then the first, if you like the genre, it&#8217;s one album that shouldn&#8217;t be missing in your collection.</p>
<p>If you want to listen, there are some recordings of her on youtube.</p>
<p>Q</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sarine.nl/2007/01/26/not-too-late/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

