<?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>blog.luguber.info &#187; Musikk</title>
	<atom:link href="http://blog.luguber.info/category/alle-slag-og-litt-til/musikk-alle-slag-og-litt-til/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.luguber.info</link>
	<description></description>
	<lastBuildDate>Tue, 17 Jan 2012 22:27:14 +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>Squeezebox Radio &#8211; et førsteinntrykk</title>
		<link>http://blog.luguber.info/2009/11/20/squeezebox-radio-et-f%c3%b8rsteinntrykk/</link>
		<comments>http://blog.luguber.info/2009/11/20/squeezebox-radio-et-f%c3%b8rsteinntrykk/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 19:45:52 +0000</pubDate>
		<dc:creator>jone</dc:creator>
				<category><![CDATA[Dingser]]></category>
		<category><![CDATA[Diverse]]></category>
		<category><![CDATA[Musikk]]></category>

		<guid isPermaLink="false">http://blog.luguber.info/2009/11/20/squeezebox-radio-et-f%c3%b8rsteinntrykk/</guid>
		<description><![CDATA[Sparker rumpe. Enkel betjening, god lyd, ser helt ok ut.]]></description>
			<content:encoded><![CDATA[<p>Sparker rumpe. Enkel betjening, god lyd, ser helt ok ut.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.luguber.info/2009/11/20/squeezebox-radio-et-f%c3%b8rsteinntrykk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>personal ruby buddha machine</title>
		<link>http://blog.luguber.info/2008/11/25/personal-ruby-buddha-machine/</link>
		<comments>http://blog.luguber.info/2008/11/25/personal-ruby-buddha-machine/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 23:36:27 +0000</pubDate>
		<dc:creator>jone</dc:creator>
				<category><![CDATA[Musikk]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[sdl]]></category>

		<guid isPermaLink="false">http://blog.luguber.info/?p=120</guid>
		<description><![CDATA[Some days ago I came across a post on the FM3 buddha machine. Finding it a fascinating concept, and being able to download their samples I sprinkled a few lines of ruby over them an stirred. Voilà - my own personal buddha machine playing wonderful ambient soundscapes in a random fashion. Using the sdl_ruby library, [...]]]></description>
			<content:encoded><![CDATA[<p>Some days ago I came across a post on the <a href="http://www.fm3buddhamachine.com/" target="_blank">FM3 buddha machine</a>. Finding it a fascinating concept, and being able to download their samples I sprinkled a few lines of ruby over them an stirred. Voilà - my own personal buddha machine playing wonderful ambient soundscapes in a random fashion. Using the sdl_ruby library, the whole thing became surprisingly simple:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#!/usr/bin/ruby -w</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'sdl'</span>
SDL.<span style="color:#9900CC;">init</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#6666ff; font-weight:bold;">SDL::INIT_AUDIO</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#6666ff; font-weight:bold;">SDL::Mixer</span>.<span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">44100</span>,<span style="color:#6666ff; font-weight:bold;">SDL::Mixer::DEFAULT_FORMAT</span>,<span style="color:#006666;">2</span>,<span style="color:#006666;">4096</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
clips = <span style="color:#CC00FF; font-weight:bold;">Dir</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'audio'</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">entries</span>.<span style="color:#9900CC;">delete_if</span> <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">|</span>x<span style="color:#006600; font-weight:bold;">|</span> ! <span style="color:#006600; font-weight:bold;">&#40;</span>x =~ <span style="color:#006600; font-weight:bold;">/</span>wav$<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#9966CC; font-weight:bold;">while</span> <span style="color:#0000FF; font-weight:bold;">true</span>
        <span style="color:#9966CC; font-weight:bold;">for</span> i <span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#006666;">1</span>..<span style="color:#6666ff; font-weight:bold;">SDL::Mixer</span>.<span style="color:#9900CC;">allocate_channels</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">4</span><span style="color:#006600; font-weight:bold;">&#41;</span>
                        <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#9966CC; font-weight:bold;">not</span> <span style="color:#6666ff; font-weight:bold;">SDL::Mixer</span>.<span style="color:#9900CC;">play</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>i<span style="color:#006600; font-weight:bold;">&#41;</span>
                                <span style="color:#6666ff; font-weight:bold;">SDL::Mixer</span>.<span style="color:#9900CC;">playChannel</span><span style="color:#006600; font-weight:bold;">&#40;</span>i,<span style="color:#6666ff; font-weight:bold;">SDL::Mixer::Wave</span>.<span style="color:#CC0066; font-weight:bold;">load</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;audio/&quot;</span><span style="color:#006600; font-weight:bold;">+</span>clips<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC0066; font-weight:bold;">rand</span><span style="color:#006600; font-weight:bold;">&#40;</span>clips.<span style="color:#9900CC;">length</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>,<span style="color:#CC0066; font-weight:bold;">rand</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">30</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
                        <span style="color:#9966CC; font-weight:bold;">end</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
        <span style="color:#CC0066; font-weight:bold;">sleep</span> <span style="color:#006666;">0.5</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.luguber.info/2008/11/25/personal-ruby-buddha-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

