<?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>Personal devlog &#187; Mac</title>
	<atom:link href="http://olorin.info/blog/category/mac/feed" rel="self" type="application/rss+xml" />
	<link>http://olorin.info/blog</link>
	<description></description>
	<lastBuildDate>Sun, 07 Mar 2010 19:21:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Advanced channel mixing on Mac</title>
		<link>http://olorin.info/blog/2009/08/advanced-channel-mixing-on-mac</link>
		<comments>http://olorin.info/blog/2009/08/advanced-channel-mixing-on-mac#comments</comments>
		<pubDate>Fri, 28 Aug 2009 21:40:26 +0000</pubDate>
		<dc:creator>kf</dc:creator>
				<category><![CDATA[Audio]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://olorin.info/blog/?p=5</guid>
		<description><![CDATA[The thing I missed the most after switching to Mac was foobar2000 media player and it&#8217;s Channel Mixer plugin. The DSP lets you upmix 2.0 to 5.1 via various methods e.g. creating surround channels or simply copying front to rear, mixing left and right to center and redirecting bass to LFE. What is more there [...]]]></description>
			<content:encoded><![CDATA[<p>The thing I missed the most after switching to Mac was <a href="http://foobar2000.org">foobar2000</a> media player and it&#8217;s <em>Channel Mixer</em> plugin. The DSP lets you upmix 2.0 to 5.1 via various methods e.g. creating surround channels or simply copying front to rear, mixing left and right to center and redirecting bass to LFE. What is more there there is also speaker delay management which allows you to keep sound you hear from 6 speakers in same phase – it really makes a difference.</p>
<p>As I switched to the MacBook and Mac OS X of course, I had stereo only audio as I my speaker set doesn&#8217;t have optical input. Recently I bought cheap <a href="http://www.morele.net/karta-dzwiekowa-itec-pretec-usb51aa-5-kanalow-1-kanal-na-subwoofer-25857/">5.1 USB sound card</a> which works well with Leopard 10.5.8. Unfortunately, there was still 2.0 audio from iTunes – until I combined power of <a href="http://jackosx.com/">JackOSX</a> and AU Lab</p>
<p><span id="more-5"></span><strong>The solution</strong></p>
<p>As I noted you will need <em>AU Lab</em> (comes with Xcode; can be found in <code>/Developer/Applications/Audio</code>) and <em>JackOSX</em>.</p>
<h4>Audio device settings</h4>
<p>You also have to configure your audio output device in <em>Audio MIDI Setup</em> (can be found in <code>/Applications/Utilities</code>). Simply select 6-channel output in <em>Audio Output</em> pane.</p>
<div id="attachment_6" class="wp-caption aligncenter" style="width: 343px"><img class="size-full wp-image-6" title="Audio MIDI Setup" src="http://olorin.info/blog/wp-content/uploads/2009/08/audio-midi-1.png" alt="Audio MIDI Setup - Channel configuration" width="333" height="112" /><p class="wp-caption-text">Audio MIDI Setup - Channel configuration</p></div>
<p>Then configure<em> Configure Speakers</em> and select 5.1 layout.</p>
<div id="attachment_7" class="wp-caption aligncenter" style="width: 469px"><img class="size-full wp-image-7" src="http://olorin.info/blog/wp-content/uploads/2009/08/audio-midi-2.png" alt="Audio MIDI Setup - Speakers layout" width="459" height="235" /><p class="wp-caption-text">Audio MIDI Setup - Speakers layout</p></div>
<p>After this you can start <em>JackPilot</em> (in <code>/Applications/Jack</code>). Go to Preferences and set it like this:</p>
<p style="text-align: center; "><img class="size-full wp-image-8 aligncenter" title="JackPilot - Preferences" src="http://olorin.info/blog/wp-content/uploads/2009/08/Obrazek-7.png" alt="JackPilot - Preferences" width="441" height="473" /></p>
<h4>JackAudio configuration</h4>
<p>Click start in Jack&#8217;s main window. If everything goes good you should have new audio device in your audio preferences &#8211; <em>JackRouter</em> &#8211; it should be selected as default output device.</p>
<h4>AU Lab – first steps</h4>
<p>Start <em>AU Lab</em>, create new document with 2 mono input channels and 6 mono output channels. This configuration gives you a lot of flexibility.</p>
<p><img class="aligncenter size-full wp-image-10" title="AU Lab - output channels" src="http://olorin.info/blog/wp-content/uploads/2009/08/Obrazek-9.png" alt="AU Lab - output channels" width="572" height="329" /></p>
<p><img class="aligncenter size-full wp-image-11" title="AU Lab - input channels" src="http://olorin.info/blog/wp-content/uploads/2009/08/Obrazek-10.png" alt="AU Lab - input channels" width="572" height="329" /><img class="aligncenter size-full wp-image-12" title="AU Lab - device selection" src="http://olorin.info/blog/wp-content/uploads/2009/08/Obrazek-11.png" alt="AU Lab - device selection" width="572" height="482" />After you&#8217;re done you should see this:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-13" title="AU Lab - document" src="http://olorin.info/blog/wp-content/uploads/2009/08/Obrazek-14.png" alt="AU Lab - document" width="456" height="460" /></p>
<p style="text-align: center;">Now double-click <em>Output 1</em>, a new dialog will appear. Rename channels – it will be convenient to know which-is-which. Order is Front Left, Front Right, Center, LFE, Left Surround, Right Surround. You can select channel by clicking it in the &#8220;matrix&#8221;. Rename input channels the same way.</p>
<div id="attachment_14" class="wp-caption aligncenter" style="width: 530px"><img class="size-full wp-image-14" title="AU Lab - audio outputs" src="http://olorin.info/blog/wp-content/uploads/2009/08/Obrazek-16.png" alt="AU Lab - audio outputs" width="520" height="424" /><p class="wp-caption-text">AU Lab - audio outputs</p></div>
<h4>Jack &#8211; routes</h4>
<p>It&#8217;s time to play the music via <em>AU Lab</em>. To do it we have to reroute audio. After start <em>JackPilot</em> is routing audio directly to sound card. We need it to be routed through <em>AU Lab</em> processor. You can do it using <em>JackPilot</em> interface, but it&#8217;d be more convenient to do it with shell script.</p>
<pre class="brush: shell">#!/bin/bash
#save this as AULab.sh

/usr/local/bin/jack_connect "AU Lab:out1" "system:playback_1"
/usr/local/bin/jack_connect "AU Lab:out2" "system:playback_2"
/usr/local/bin/jack_connect "AU Lab:out3" "system:playback_3"
/usr/local/bin/jack_connect "AU Lab:out4" "system:playback_4"
/usr/local/bin/jack_connect "AU Lab:out5" "system:playback_5"
/usr/local/bin/jack_connect "AU Lab:out6" "system:playback_6"</pre>
<pre class="brush: shell">#!/bin/bash
#save this as iTunes.sh

# disconnect iTunes from sound card
/usr/local/bin/jack_disconnect iTunes:out1 system:playback_1
/usr/local/bin/jack_disconnect iTunes:out2 system:playback_2
# plug iTunes to AU Lab
/usr/local/bin/jack_connect iTunes:out1 "AU Lab:in1"
/usr/local/bin/jack_connect iTunes:out2 "AU Lab:in2"</pre>
<p>Set proper chmods and run scripts. Music from iTunes should go through AU Lab. You should hear only left speaker so far.</p>
<h4>AU Lab – audio processing</h4>
<p>Let&#8217;s come back to our AU Lab document. I assume that nothing gone wrong so far. Firstly we need right channel to work. By default it is routed to channel Left. Simply turn off routing from Right input to Left output by clicking digit 1 in Volume section of Right input channel and turn on digit 2 (routing to Right channel). Enable also routing from L to RL by clicking 5 in L input Volume section and from R to RR (number 6). Now we have quadraphony.</p>
<p>Now we want to provide C and LFE with mono. Simply route both L and R to both C and LFE. Then you have to turn the volume of C and LFE down, we don&#8217;t want overdrive. Remember to set a Low Pass Filter effect on LFE (cutoff frequency can be 150 Hz).</p>
<p>If you want to hear audio in the same phase you can use Delay effect. Note that delay you set here is not the time it takes sound waves reach you – to simplify: you should set highest delay to speaker which is nearest. I won&#8217;t cover details of delays, as I&#8217;m not an audiophile.</p>
<h4>Final conclusion</h4>
<p>Great! We have music surrounding us. I love to listen <a href="http://www.lastfm.pl/music/Riverside/_/Rapid+Eye+Movement">Riverside &#8211; Rapid Eye Movement</a> this way! What next? <em>AU Lab</em> is very powerful tool, you can set different volume for every speaker. If sound card doesn&#8217;t allow to do that itself you can create 6 mono input/output configuration just to set the volume. If you want to do this remember to select proper speaker layout as we done at the beginning.</p>
<h4>Leopard Snow support</h4>
<p>AU Lab works well. You need to install new JackOSX – development versions work well in this scenario.</p>
]]></content:encoded>
			<wfw:commentRss>http://olorin.info/blog/2009/08/advanced-channel-mixing-on-mac/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

