Introducing Tito
I wanted to introduce the first of what I hope will be several Chrome Experiments (prediction: all HTML5, and all music-related). It’s called Tito, and you can play with it here.
What is it? It’s an early prototype for a musical instrument that uses a bouncing ball gravity model to trigger and manipulate audio samples. It’s an instrument that designed to be played as chord accompaniment for a lead instrument. You “play” the instrument by clicking the chord buttons on the right. Note for music geeks: 7ths and Dim notes are provided with each chord, but muted by default. Click on the notes at the bottom of the bouncing ball graphs to enable them.
Requirements: Tito requires Chrome, Safari, or Firefox. Also, Tito requires Flash as the audio portion is still being done in Flash (Currently Firefox 4 is the only browser to have an HTML5 spec for audio data, alas.)
Here are the new features I’m working on for the next version:
- Ability to choose between multiple different sample sets.
- Option to retrigger all the balls on each chord change.
- Ability to position falling balls by clicking on them and letting go. Done! 10/21/10.
- Sliders for changing gravity settings.
- And finally, whatever features you want. @reply me on twitter (@dhilowitz).
- Ability to mute specific balls. Done! 10/19/2010.
- Ability to change chords. Done! 10/1/2010.
Please enjoy!
–David
TIP: How to get “anonymous” class functions to show up in Safari’s JavaScript Profiler
I’ve been developing a JavaScript module for some graphing work I’m doing. I’ve been using Safari’s built in profiler to figure out which functions are wasting the most CPU. It’s a great tool:

For the longest time, I was running up against this one problem: some of my member functions were being listed simply as “(anonymous function)” in the Profiler function list (see highlighted row above). Not cool. (Luckily for me, the Profiler also lists the .js file and the line number, so it wasn’t that hard to figure things out, but certainly annoying nonetheless.)
Anyway, I’ve finally found a solution. You see, I was declaring my class functions as follows:
Grafsz.prototype.ClearCanvas = function()
{
...
}
…notice how I’m not giving my function a name? I’m basically assigning an anonymous function to a member variable of the class. All I had to do was change it to
Grafsz.prototype.ClearCanvas = function ClearCanvas()
{
...
}
That’s it. Check it out:

TIP: “Google Analyticator” Plug-In for WordPress
We frequently use Google Analytics to track the readership of the blogs we design and create. Fed up of having to configure Google Analytics tracking code over and over again for each new theme we create (and we’ve done this for a lot of themes over the years), we finally decided to search for aWordPress plug-in to do it for us.
In comes “Google Analyticator.”
Not only does it add the Google tracking code to the bottom of your posts, but it also has a ton of other features like outbound link tracking, download tracking, turning itself off for Admin users, etc. A lot of these features are things we actually developed custom solutions for back in the day so it will definitely be interesting to see how they stack up.
Check it out: http://wordpress.org/extend/plugins/google-analyticator/

