Twitter
Products / Projects
Non-Tech
  • The MIDI Manual: A Practical Guide to MIDI in the Project Studio
    The MIDI Manual: A Practical Guide to MIDI in the Project Studio
    by David Miles Huber
  • Principles of Digital Audio
    Principles of Digital Audio
    by Ken Pohlmann
  • Design Patterns: Elements of Reusable Object-Oriented Software
    Design Patterns: Elements of Reusable Object-Oriented Software
    by Erich Gamma, Richard Helm, Ralph Johnson, John M. Vlissides
  • The Art of Computer Programming Boxed Set (Volumes 1-3)
    The Art of Computer Programming Boxed Set (Volumes 1-3)
    by Donald E. Knuth
  • Cocoa(R) Programming for Mac(R) OS X
    Cocoa(R) Programming for Mac(R) OS X
    by Aaron Hillegass
  • Core Animation for Mac OS X and the iPhone: Creating Compelling Dynamic User Interfaces
    Core Animation for Mac OS X and the iPhone: Creating Compelling Dynamic User Interfaces
    by Bill Dudney
Monday
14Dec2009

Maven Users: Update Your web.xml files to 2.4 to use JSTL Tags

I came across a tricky problem today.  I had used Maven to create a simple Java web application that I have been building upon.  I got to the point where I wanted to use some JSTL tags in my presentation layer.  Oddly enough the raw tags were being ignored and showing up in the HTML output.   The problem turned out to be the usage of an older version of the web.xml file that Maven had generated.  The 2.3 version uses a Doctype, and does not support the JSTL tags:

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

If you want your web app to process JSTL tags, you should update this file to use a 2.4 syntax instead. The 2.4 version uses an XML schema instead of DTD to validate, so remove the above mentioned section and replace with the following:

<web-app id="myApp" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
Sunday
13Dec2009

High Speed Internet in Canada Sucks

We received a letter from Telus last month telling us that we had exceeded our monthly data consumption quota.  They informed us that if we exceeded this quota again, we would be suspended for 30 days.  I had always assumed there was some sort of limit, but I never thought we would ever exceed it.  I would say I'm a fairly heavy internet consumer; mong downloading the occasional large file (I like to try the new Linux distros), watching some internet video, online gaming, Skyping my parents, and general web browsing, I make full use of my internet privelages.  I should also mention we pay top dollar to Telus to do so. We subscribe to the second best available plan. 

I did a bit of research online to see just how much monthly data consumption we are allotted.  The result was shocking and pathetic - a measly 60 gigabytes.  I'll iterate again that we have the second best plan you can buy.  What a joke.

Telus' best plan offers an unimpressive 100 gigabytes. 

I would like to take a sentence or two to complain specifically about Telus.  Their plans are underwhelming and their customer support is mediocre.  It is my opinion (based on my past relationship with them as a provider) that they have minimal regard for their customers.  They take full advantage of the near-monopolistic situation in Canada at the present. 

That really is my main gripe however: the stagnant, optionless market we Canadians have when choosing mobile and broadband services.  We have three main companies: Telus, Bell and Shaw, which are pretty much the only choices available for broadband connectivity (I know, there are some little guys too).  After poking around on Bell's and Shaw's websites, I concluded that their offerings aren't much better.  Have a look at the minitable I've compiled.  Don't consider this information perfectly correct; it's what I could find after some basic browsing.  I've also included two American providers for perspective. 

In terms of monthly download capacity and bandwidth, Verizon and Comcast offer much better plans for the same price.  Maybe this comment is unpatriotic but, please, Verizon and Comcast, come north and compete with the mediocrity we have going on at the moment. 

Friday
09Oct2009

Visualizing Marsyas Data With Quartz Coposer

Steven Ness at sness.net created a really cool application for visualizing several dimensions of an audio file.  Here is a screencast of the awesomeness:

This was created using Marsyas, an open-source audio processing framework.  I have posted a few tutorials about getting up and running with Marsyas on the Mac.  I wanted to do something cool like this, unfortunately I wasn't gifted with Steve's sweet openGL skills.  Instead I turned to an application called Quartz Composer.  Quartz Composer is a Mac (built in) application that provides the user with a visual programming environment, allowing for the creation of rich graphics and animations:

The user is presented with a canvas and a library of processing units called nodes.  Producer nodes generate data, processing nodes perform some calucation on the data, and consumer nodes render the data.   Ouputs are listed along the right edge of the node, and inputs are listed along the left.  Nodes are connected by dragging a line from the output of one node to the input of another. 

Previous versions of OSX limited the user to the set of built in producer nodes.  Snow Leopard, however, allows for the creation of custom nodes, written in Objective-C.  This is there Marsyas fits in. 

Briding the Explicit / Implicit Patching Divide

The above diagram of Quartz Composer illustrates what's known as an explicit patching model.  Patches - the connections between components - are explicitely created by the user.  Marsyas on the other hand uses an implicit patching model.  Connections among Marsyas nodes are implicitely established based on the order in which components are added to the network. 

This project sees the Marsyas functionality, which is implemented in C++ and Objective-C, encapsulated in a producer node within Quartz Composer.  An unlimited number of ports can be published for use in Quartz Composer, whcih are really representing any output from Marsyas. The following figure shows the use of a custom Marsyas producer node, and how it's output can be used to drive a graphical rendering:

These figures show a simple document where a Marsyas node is providing some information to a rotating cube.  The example isn't too exciting ( I plan to do more useful things soon), but it does show what is possible.  In this case, the Marsyas node has a fileInfo output port.  This port pushes out data in the form of a dictionary.  The keys in the dictionary represent some basic values about the file Marsyas is processing including sampleRate, numberOfChannels, lengthInSamples and lengthInSeconds.  Here is a video of the results:

Like I said, the data in this example isn't too exciting, but there are a few cool things going on.  You will notice that the audio is playing back while the graphic is rendering.  This isn't normal behavior in Quartz Composer, but I placed the audio playback on a separate thread.  Also, it is possible to publish pretty much any type of data that Marsyas is capable of producing to Quartz Composer.  Once in Quartz Composer, anything can be done with the data.  In other words, the visualization and data are kept separate can be implemented at separate times. 

Future Work

The next step in this project is to rethink the threading model I'm using.  Right now I have two separate threads running: one to play the audio and one to periodically write the audio information to the output ports.  You may notice some crackling in the audio and choppiness in the video. I think this is because I'm locking some common data structures too often. 

I also want to publish more data to Quartz Composer such as amplitude, panning, centroid, etc.

Monday
21Sep2009

Environment Variables Available in xCode

I like this awesome tip from Aaron Smith at Code Endeavor.  It talks about creating a reference list of all environment variables avaible when building a project with xCode.  It is pretty simple: Create a run script build phase in your project and set the script instructions as:

env > ENVIRONMENT_VAR_LIST

This will create a text file in your build directory with all of the available environment variables. 

Wednesday
09Sep2009

Quick Notes on Jailbreaking the iPhone

iClarify has the best tutorials I've seen to do this ( link ).  They should soon have one for the 3.1 update.