{"id":8298,"date":"2013-02-17T22:16:45","date_gmt":"2013-02-18T03:16:45","guid":{"rendered":"http:\/\/scruss.com\/blog\/?p=8298"},"modified":"2013-02-17T22:16:45","modified_gmt":"2013-02-18T03:16:45","slug":"a-murder-of-crows-on-your-raspberry-pi-with-boodler","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2013\/02\/17\/a-murder-of-crows-on-your-raspberry-pi-with-boodler\/","title":{"rendered":"A Murder of Crows on your Raspberry Pi with Boodler"},"content":{"rendered":"<p><a href=\"http:\/\/boodler.org\/\">Boodler<\/a> is rather fun. It generates ambient music based on user-defined or downloaded \u00e2\u20ac\u02dcsoundscapes\u00e2\u20ac\u2122. If you&#8217;ve got a modern (HTML5\/<a href=\"http:\/\/www.opus-codec.org\/\">Opus<\/a>-capable) browser, you can hear a streaming demo here: <a href=\"http:\/\/repeater.xiph.org:8000\/clock.opus\">http:\/\/repeater.xiph.org:8000\/clock.opus<\/a>. It&#8217;s using the <a href=\"http:\/\/www.fm3buddhamachine.com\/v2\/\">FM3 Buddha Machine<\/a> samples in this demo, but it can run lots more: a tree full of crows, a thunderstorm, dripping water, &#8230;<\/p>\n<p>It&#8217;s pretty easy to run on a Raspberry Pi running a recent version of Raspbian. The only technical glitch I had was that there&#8217;s something deeply confused about <a href=\"http:\/\/www.alsa-project.org\/main\/index.php\/Main_Page\">ALSA<\/a> sound handling on the Raspberry Pi. I&#8217;m sure it&#8217;ll get fixed soon, but for now, you have to use <a href=\"http:\/\/www.freedesktop.org\/wiki\/Software\/PulseAudio\">PulseAudio<\/a>. (If you want to read about my ALSA woes, go <a href=\"http:\/\/www.raspberrypi.org\/phpBB3\/viewtopic.php?f=32&amp;t=33227&amp;p=289592#p289405\">here<\/a>.)<\/p>\n<p>The installation prerequisites are simple:<\/p>\n<pre>sudo apt-get install\u00c2\u00a0pulseaudio pulseaudio-utils libpulse-dev python-dev<\/pre>\n<p>Now download and configure Boodler:<\/p>\n<pre>wget <a href=\"http:\/\/boodler.org\/dl\/Boodler-2.0.4.tar.gz\">http:\/\/boodler.org\/dl\/Boodler-2.0.4.tar.gz<\/a>\r\ntar xvzf Boodler-2.0.4.tar.gz\r\ncd Boodler-2.0.4\r\npython setup.py build<\/pre>\n<p>It takes a while to do this, but make sure it does something useful when it&#8217;s building the various sound drivers. You don&#8217;t want it to say:<\/p>\n<pre>skipping 'boodle.cboodle_pulse' extension<\/pre>\n<p>If it says that, you haven&#8217;t installed Pulseaudio. Go back and check your apt-get line.<\/p>\n<p>Once it&#8217;s built, now install it:<\/p>\n<pre>sudo python setup.py install<\/pre>\n<p>Now test it:<\/p>\n<pre>boodler --hardware --output pulse --testsound<\/pre>\n<p>Not merely should you get some pleasant tones from your Raspberry Pi&#8217;s audio, but you sound get some informative and non-threatening terminal output. Mine looks like:<\/p>\n<pre>Boodler: PulseAudio sound driver.\r\n PulseAudio library: 2.0.0.\r\n Sample rate is 44100 fps.\r\n Samples are 16-bit little-endian.\r\n Buffer size is 32768.\r\n 21:37:46 (root) Running \"Boodler test sound\"<\/pre>\n<p>If that works, let&#8217;s get those crows a-cawin&#8217;. Download the soundscapes you need:<\/p>\n<pre>boodle-mgr install http:\/\/boodler.org\/lib\/org.boodler.old.crow.1.0.boop\r\nboodle-mgr install http:\/\/boodler.org\/lib\/com.eblong.zarf.crows.1.0.boop<\/pre>\n<p>and run it:<\/p>\n<pre>boodler --output pulse com.eblong.zarf.crows\/ParliamentOfCrows<\/pre>\n<p>Crows everywhere!<\/p>\n<p>I really like the Buddha Machine samples. It&#8217;s quite big (&gt; 80 MB), so this next set will take a while to download:<\/p>\n<pre>boodle-mgr install\u00c2\u00a0 http:\/\/boodler.org\/lib\/com.azulebanana.buddhamachine.1.5.1.boop\r\nboodle-mgr install http:\/\/boodler.org\/lib\/com.azulebanana.buddhaagent.1.5.1.boop<\/pre>\n<p>It&#8217;s worth the wait:<\/p>\n<pre>boodler --output pulse com.azulebanana.buddhaagent\/ChangingLoops<\/pre>\n<p>Boodler has tons of options, prebuilt packages, and instructions to build your own: <a href=\"http:\/\/boodler.org\/doc\/\">Boodler Documentation<\/a>.<\/p>\n<p>One thing I&#8217;ve tried to get working, but failed, is streaming from Boodler via <a href=\"http:\/\/www.icecast.org\/\">icecast<\/a>. Sure, I can install and run it, it&#8217;s just that the results are, um, <em>undesirable<\/em>. If you want to have a play, here&#8217;s how to install icecast:<\/p>\n<pre>sudo apt-get install icecast2 ices2 libshout3-dev<\/pre>\n<p>Icecast will configure itself, and ask for a couple of passwords. You&#8217;ll have to rebuild and reinstall Boodler for it to catch the new configuration. You can then try streaming:<\/p>\n<pre>boodler --output shout --define shout-password=mypassword --define shout-mount='\/boodler-buddha.ogg' com.azulebanana.buddhaagent\/ChangingLoops<\/pre>\n<p>If you open a web browser at this address <a href=\"http:\/\/raspberrypi:8000\/\">http:\/\/raspberrypi:8000\/<\/a> you should see a config page listing your boodler-buddha.ogg stream. Click on the M3U link next to it, and your streaming music player <em>should<\/em> start making a joyful noise &#8230;<\/p>\n<p>&#8230; except in my case, <em>something<\/em> went very wrong, and it started to produce industrial ultra-glitch nightmare noise: <a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/02\/boodler-streaming_test-fail.mp3\">boodler-streaming_test-fail<\/a>. I&#8217;m sure it&#8217;s fixable with some tweaking, but I&#8217;m not there yet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Boodler is rather fun. It generates ambient music based on user-defined or downloaded \u00e2\u20ac\u02dcsoundscapes\u00e2\u20ac\u2122. If you&#8217;ve got a modern (HTML5\/Opus-capable) browser, you can hear a streaming demo here: http:\/\/repeater.xiph.org:8000\/clock.opus. It&#8217;s using the FM3 Buddha Machine samples in this demo, but it can run lots more: a tree full of crows, a thunderstorm, dripping water, &#8230; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[2527,2623,1911,1183,2620,2621,2540,2510,2536],"class_list":["post-8298","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-ambient","tag-boodler","tag-crash","tag-glitch","tag-icecast","tag-pulseaudio","tag-python","tag-raspberrypi","tag-raspbian"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-29Q","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/8298","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=8298"}],"version-history":[{"count":4,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/8298\/revisions"}],"predecessor-version":[{"id":8303,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/8298\/revisions\/8303"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=8298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=8298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=8298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}