— tomauger.com

Archive
Uncategorized

Just wanted to post a quick link here to audio.stackexchange.com – it’s a great site where you can ask any question you can dream up about your audio production or recording projects, help with obscure MIDI sequencers or DAWs like Cubase, Ableton Live or Cakewalk, or even just get some ideas for the best VSTi for a particular application or sound you’re looking for.

If you’re an audiophile, a composer or an electronic musician, you’re guaranteed to find a community of knowledgeable experts who will help you out and get you the answers you need.

Read More

Came across the most frustrating IE bug (for IE 7 anyway, there are rumours that this has been fixed in IE8, though I haven’t dared to try yet.

let’s set it up: you have an existing <FORM> element somewhere on your page, and for whatever reason you would like to add elements (such as a hidden field, or a textbox) to this form dynamically from a JavaScript function.

(Sane) Non-IE code:

newField = document.createElement("input");
newField.setAttribute("name", "myNewField");
newField.setAttribute("type", "hidden");
newField.setAttribute("value", "it is a secret");
 
theForm = document.getElementById("myForm");
theForm.appendChild(newField);

Loverly! A little wordy and all that, but hey, that’s what working (correctly) with the DOM is like, and we get used to it. Though we never love it (that’s where MooTools etc come in…)

Of course, if we do a little peeking around with

alert(theForm.innerHTML);

Everything is beautiful in the “good” browsers (FF and Chrome et al) and then we look at IE. Guess what?

Internet Explorer does not allow you to set the name attribute of an element after it’s been created. Yep. It’s a read-only property. element.setAttribute(“name”, “whatever”) fails. silently.

In some peabrained propellerhead way, I can see that this makes sense – IE used to use “name” the way the DOM uses ID, and changing something’s ID after it’s created can cause havoc. If you’re a lazy-ass, short-sighted programmer of course.

But we already knew that that’s a primary job qualification of the IE development team, right?

Enough griping, Tom you ass, what’s the workaround?

IE has this really ugly (mis)implementation of document.createElement() that fails in all other browsers, where you can actually pass the entire HTML element as a string. Not just the node name (ie: “input”) but the actual HTML (ie: “<input name=’blah’>”).

This is the ONLY time you can set the name attribute – on creating the element.

But I mentioned that it fails (errors out) in other browsers.

So, we wrap the whole ugly baby in a swaddling try…catch statement and send it down the river like so….

Ugly-ass Try…Catch Wrapper for Uglier-Ass IE Element Creation Code

try {
  // for IE, curse it
  newField = document.createElement("&lt;input name='uglyBaby'&gt;");
} catch (error) {
  // for all other sane browsers that bothered to read the DOM specification
  newField = document.createElement("input");
  newField.setAttribute("name", "happyChild");
}
 
// ... and then you can set all your other attributes nicely here for all browsers...

I need to go puke somewhere. Please excuse me.

Read More

Although the Behringer FC-1010 seems to be a simpler match-up for getting foot-pedal control, with expression input, to Ableton Live, the Boss (Roland) FC-50 is a solid choice in a more robust and compact format. Given that I was able to pick one up on Craigslist for about $100, I figured this would be the way to go.

The real challenge with the FC-50 is that it sends MIDI PC (Program Change) data, not CC (Controller Change) data. Since the FC-50 was designed to control patch switching for external synths and guitar effects racks, PC data was the right call. Unfortunately for those of us in the DAW generation, especially Ableton Live users, PC messages are not as useful or versatile as CC data. Ableton Live, specifically, at least as of version 8, converts all PC MIDI data into Pitch Bend (PB) data, and all on the same PB #, so although you COULD use the PB data to trigger, for example, a global clip start, you couldn’t take advantage of the fact that the FC-50 has 5 footswitches. If I wanted just 1 footswitch, there are a lot easier ways to go about hooking one up to Ableton.

Well, getting the FC-50 working exactly as I wanted it proved to be a little challenging for me, given my hardware and software configuration, but for what it’s worth, I”m posting my experience here, in case it may be of use to others. I am by no means a MIDI wizard, but with about 5 hours of research, installation and experimentation, I was able to create a configuration that for now appears to meet my needs, which are:

  • leverage all 5 foot-pedals to be able to MIDI- or Key-map to any toggle-based Live control input, such as track start, overdub on/off, move up/down scene etc.
  • leverage the Expression pedal input capabilities and map Expression to any continuous controller in Live (not just volume)
  • spend no additional money to do all this

Read More

I’ve got an extended warranty on my Dell XPS M1730 and I gotta say, Dell is great about sending replacement parts in a prompt and professional manner.

But talk about overpackaging! The items shipped to me were a laptop power supply and cable. The cable (just a regular power plug) was packaged inside its own little box with foam on either side. The power pack was in a larger box, padded as well. All of that was then put in a really large, mostly empty box. I understand from a logistics standpoint why such a blunder might occur, but come on guys. What’s all this talk about more corporate responsibility?

dellpackaging1

Read More

This is a quickie. I recently had a lengthy form using the <label> tag, and needed to switch label methods. Being industriously lazy, I figured a Regular Expression search and replace would do the trick. Fortunately DreamWeaver CS4 supports Regular Expressions in its Search and Replace dialog box (as long as you turn the appropriate checkbox on!).

In case you’re not too familiar with the <label> tag, it can be used in two ways:

<label>First Name<input type="text" name="firstName" /></label>

and

<label for="firstname">First Name</label><input type="text" name="firstName" />

They look similar, but the salient difference here is that one form of the <label> tag usage encapsulates the form element, while the other does not. There are various (mostly) CSS-related reasons why you would choose one over the other, most notably in terms of whether you would rather be able to have a block surround your text label and input form, or whether you would rather be able to have two separate blocks (which might need to be encapsulated by further markup – such as an ordered list item, as suggested on A List Apart.

Anyway, I was using the first form, and needed to switch to the second form of the tag. The following two regular expressions will do that for you:

“Find” RegExp: <label>([^<]+)(<input.+name=”([^"]+)” \/>)<\/label> 

“Replace” RegExp: <label for=”$3″>$1</label>$2

What’s cool here is that it automatically populates the “for” attribute of the label with the “name” attribute of the input tag, while leaving the rest in place.

Big Disclaimer: There is a good chance that this RegExp will not work for your specific situation, because it is highly specific. If you are not familiar with Perl-style Regular Expressions, you will most likely not be able to make much use of this unless your input tags are exactly the same as mine (ie: the “name” attribute is the last attribute before the closing />, all your spacing is the same, everything is lower case etc). If you would like me to craft a more generic RegExp, leave a comment and I will do one up.

Read More

Oh man, I’ve done it. I’ve gone out and started to create an online fashion store. Intense.

 Zeitguys is such a cool name, and I’ve always thought it would be neat to call our employees a “zeitguy”, so I came up with these shirts. Then I just went nuts and I realized, hey, other people might think this was cool too. So the Zeitguys Apparel store at Zazzle.com was born.

Check it out! The stuff’s not expensive, shipping is cheap, and if you’re at all geeky, you might get a kick out of our newest: the propellerhead “I’m hip. I’m with it” or the glasses with [iiii] (four eyes – get it???). I slay me.

Cheers!

Read More