How to disable Ableton Live ReWire in DP7

I’ve been configuring a new audio workstation, and I found that my Reason and Sibelius ReWire audio inputs wouldn’t work in MOTU Digital Performer 7 like they do on our other workstation. I spent the first part of 4 hours trying to decipher whether the problem was with Sibelius’ config or DP’s, only to remember that I hadn’t yet disabled Ableton Live’s ReWire slave mode and inputs for this new workstation.

I’m not sure the problem is necessarily with Live, but perhaps with DP having to handle so many ReWire inputs — maybe DP (or ReWire) has a 128 channel limit? At least on Snow Leopard 10.6.2 with Digital Performer 7.02 and Live 8.1.1, DP couldn’t handle adding Live’s additional 64 inputs to my existing 64 Reason inputs, 2 Sibelius inputs, and 2 Waves inputs. Note: the Live inputs were not even assigned to a DP input. (In Bundles, no rows and no chicklets). Just having Live’s inputs *available* in DP prevented both Reason and Sibelius from passing ReWire audio into DP.

I generally use Live as a standalone DAW, so I don’t need access to these ReWire inputs in DP. But it’s not very obvious how to disable them, and it took me the rest of the 4 hours trying to get DP to forget about Live’s ReWire channels. Turns out it’s stupid-simple. Add one preference in Live’s Options.txt file and then delete two aliases from two different Mac OS X Library folders.

NOTE: Doing the steps below prevents Live from becoming a ReWire slave mode for all apps. It also completely removes the inputs from Digital Performer’s Bundles > Instruments window. I don’t know what else it might do — proceed at your own risk. 🙂

To disable Ableton Live’s ReWire slave mode and remove the inputs in MOTU Digital Performer:

  1. Quit both DP and Live if either are open.
  2. Edit (or create) your current “Options.txt” file for Live, according to Ableton’s FAQ page. Add the (undocumented) flag -ReWireSlaveOff. Setting this flag tells Live not to undo what you are going to do in step 4.
  3. Save and close Options.txt.
  4. Navigate to /Library/Application Support/ (that is, your top-level Library folder) and trash the alias named “Ableton Live Engine.bundle”. Navigate to ~/Library/Application Support/ (this one is the Library in your Home folder) and do the same thing to that “Ableton Live Engine.bundle” alias.
  5. Empty the trash for good measure.
  6. Relaunch DP and verify that the Ableton Live channels are gone from the Bundles > Instruments tab.

DP’s Instrument Bundles have been a little fickle since v6, so this all may be the result of some bug in DP. Or am I hitting some limitation of ReWire 1.7, or is it something in Live’s implementation of ReWire. It is curious that every other audio app I have besides Live places a .bundle file in /Library/Application Support/Propellerhead Software/ReWire/ to register their outputs.

Why does Live place a lonely alias at the top-level of Application Support? Why isn’t the file named “ReWire” like other companies do? Maybe that “Ableton Live Engine.bundle” alias does more than just publish ReWire outputs. But Live reinstates the alias only when the -ReWireSlaveOff flag is gone from Options.txt. So as long as Live doesn’t repair the alias when -ReWireSlaveOff *is* present, I’d say we’re safe.

What originally started as a quest to fix broken ReWire audio between Sibelius and DP became instead about how DP and Live work together (or don’t).

Deleting Live’s ReWire inputs from Digital Performer restored ReWire audio from Sibelius and Reason both. I hope that saves you some time.

How-to Fix WP HTTP Error: name lookup timed out

This blog and the Snowferno site both run WordPress on separate but identically-equipped Lunarpages servers. When I went to apply today’s WordPress 2.8.4 upgrade, one install was giving me “WP HTTP Error: name lookup timed out” messages and no upgrade button, while the other worked just fine. There are some workarounds detailed on the WordPress support site, but I wasn’t happy having to disable cURL on one host and not the other. It had to be something else…

The problem for me was caused by lines 1276-1277 of the wp_Http_Curl request() method in wp-includes/http.php:

curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $r['timeout'] );
curl_setopt( $handle, CURLOPT_TIMEOUT, $r['timeout'] );

I commented those lines out and threw in a line of debug code on line 1325 (after the curl_exec call)

print_r(curl_getinfo($handle));

and tested the cURL transport using Core Control. I found that my requests were simply taking longer than the timeout provided. I don’t know quite why, except to guess that one server must be just more swamped than the other.

I fixed it by building myself a little plugin that adds an action for the 'http_api_curl' action called on line 1315.

After enabling this fix, WP showed the 2.8.4 upgrade button on the Dashboard page, but the WordPress Development Blog and Plugins RSS feed boxes still showed timeout errors. So, I looked further and found a filter that catches and can modify $r['timeout'] in the wp_Http request() method on line 237.

Here is my barebones plugin code, which overrides all timeouts to a massive 15 seconds:

//adjustments to wp-includes/http.php timeout values to workaround slow server responses
add_filter('http_request_args', 'bal_http_request_args', 100, 1);
function bal_http_request_args($r) //called on line 237
{
	$r['timeout'] = 15;
	return $r;
}

add_action('http_api_curl', 'bal_http_api_curl', 100, 1);
function bal_http_api_curl($handle) //called on line 1315
{
	curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 15 );
	curl_setopt( $handle, CURLOPT_TIMEOUT, 15 );
}

I recommend you make sure this does not cause any other issues for your WP install. If you know how to make this code into a plugin, then you are capable enuf to be responsible for any adverse fallout. 🙂 I only know this solved my immediate problem while still maintaining cURL functionality.

A few fixes for Podcasting plugin feed validation errors

I just got a Feedburner warning that my podcast feed was invalid. I was also getting quite a few Feed Validator errors, but nothing I could fix in Podcasting’s settings or trace to bugs in the plugin code. Evidently, some versions ago, Podcasting stored a few odd values in my WP database that had to be manually corrected. Here’s how I fixed them.

Check your feed’s <itunes:name> and <itunes:email> values and make sure they are not reversed. Mine were. So just find your “pod_itunes_ownername” and “pod_itunes_owneremail” values in your “wp_postmeta” table and edit them.

SELECT * 
FROM  `wp_options` 
WHERE  `option_name` LIKE 'pod_itunes_owner%'

Second, a bunch of my posts’ “explicit” values were stored as “default” instead of the correct “” (empty string). iTunes only allows “no”, “yes”, and “clean” for <itunes:explicit>, and Podcasting didn’t translate “default” into anything, so you gotta fixup these posts:

SELECT * FROM `wp_postmeta`
WHERE
     `meta_key` = 'enclosure' and
     `meta_value` like '%s:8:"explicit";s:7:"default";%'

… and after making sure your database is backed up and all that, just run this query to update them:

UPDATE `wp_postmeta`
SET `meta_value` = replace(`meta_value`, 's:8:"explicit";s:7:"default";', 's:8:"explicit";s:0:"";')
WHERE
     `meta_key` = 'enclosure' and
     `meta_value` like '%s:8:"explicit";s:7:"default";%'

How-to modify jQuery Lightbox Plugin to use Image Sets

UPDATED - 02/16/09
Another jQuery Lightbox plugin exists that supports imagesets by default. I am using the newer plugin now and recommend everyone do the same.

  • Both releases were at version 0.5, so I thought they were the same. Looking closer at the changelogs, I found this new one by Warren Krewenki to be better maintained and supports imagesets without hacking.
  • NOTE: My modification below only applies to the Leandro Vieira Pinho version.
  • Be aware that Krewenki’s Lightbox function is called lightbox, all lowercase. Pinho’s was camelcased as lightBox. In addition to pointing to the filenames of Krewenki’s new .js and .css files, your initializing function needs to be updated to all lowercase. Most settings don’t carryover either between the two jQuery plugs — although Krewenki’s match to the original Lightbox better — so verify those, too.

ORIGINAL POST:
I use the very popular Lightbox 2 script in places on this site, which is built upon the Javascript framework Prototype and script.aculo.us library. But, I also love the Javascript image gallery Galleria which requires jQuery. I don’t want to load both frameworks all the time, so I was happy to find a jQuery port of Lightbox called jQuery lightbox plugin.

The HTML syntax is almost identical between the two lightbox scripts, so I don’t have to recode any IMG tags. However, version 0.5 of the jQuery lightbox plugin does not recognize Lightbox 2 image sets (a group name between square brackets in the rel attribute).

By adding one IF statement to jquery.lightbox-0.5.js, jQuery lightbox plugin can gain this feature. The code below should replace lines 79-82.

jquery.lightbox-0.5-modified.js

// Add an Array (as many as we have that match the objClicked 'rel' attr), with href and title atributes, inside the Array that storage the images references		
for ( var i = 0; i < jQueryMatchedObj.length; i++ ) {
	if(jQueryMatchedObj[i].getAttribute('rel')==objClicked.getAttribute('rel')) {
		settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));
	}
}

Line 81 in the above code is the key. The matching elements passed in the jQuery object get added to the image array only if their ‘rel’ attributes match the initial ‘rel’ attribute of objClicked.

Then, your initializing function should read like this:

your-image-page.html

$(function() {
	// Select all links whose attribute rel starts with lightbox
	$('a[rel^=lightbox]').lightBox();
});

Note the caret character after ‘rel’, which matches all elements having the ‘rel’ attribute and values *beginning* with ‘lightbox’. Also, jQuery’s Selector API documentation says that the “@” before the attribute name has been deprecated as of v1.2. See more under the “Selectors > Attribute Filters” section of jQuery documentation.

Maybe there is a more elegant way to compare elements that doesn’t require matching the ‘rel’ attributes. But, to retain the same HTML syntax for those converting from the Prototype/script.aculo.us script to jQuery plugin, this hack will do nicely.

iPhone Remote app + Airfoil + Airfoil Speakers = iTunes Heaven (UPDATED with AirPlay details)

UPDATED - 09/01/10
Apple introduced AirPlay today, the next incarnation of AirTunes wireless media streaming. iPhone, iPad, and iPod touch running iOS 4.2+ can wirelessly streaming of audio, video, and photos to Apple TV as well as other AirPlay-compatible hardware receivers.)

ORIGINAL POST
My iTunes library lives on our laptop, but I’m often on our other “big” computer and want to listen to those tunes. I could stream between iTuneses, but I want this listening to count — i.e. increment play counts, let me change star ratings, etc. You can’t do that with iTunes streaming.

But now, with 2 computers, a wireless network, an iPhone running OS 2.0+, four cross-platform apps (3 of which are free), and a little scotch tape, my dream is possible.

  1. You’ll need the following apps: iTunes, Rogue Amoeba’s Airfoil ($25), their companion app Airfoil Speakers, and Apple’s Remote for iPhone
  2. Open Airfoil Speakers on the destination computer.
  3. Open Airfoil on the source computer and select “iTunes” from the source list.
  4. In Airfoil, activate the connection to the Airfoil Speakers computer. (iTunes will launch or relaunch, and Airfoil will establish a digital link to the destination.)
  5. Get your iPhone on your Wi-Fi network
  6. Open Remote, select a tune, and press play!

Fixing the Music Store country settings in Front Row

Front Row decided to show me Germany’s “Top-Titel” and “Top Musikvideos” under the Music menu. Somehow my Front Row preferences got out of sync with my iTunes Music Store country settings. Deleting Front Row’s preferences and caches didn’t work; that only started a roulette game in which Front Row randomly sent me to another country. I got Japan next. Fun.

The solution is to edit Front Row’s preferences. Open this file in Property List Editor:
~/Library/Preferences/com.apple.frontrow.plist

  1. Expand “Root” and find the MusicStoreFrontID key.
  2. Set the value to 143441, the ID for the US store.
  3. Save and close.

Front Row will see the change on the next launch.