Introducing Tito

Posted on October 20, 2010 by David Hilowitz

Tito Screenshot Hi Everyone,

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

How I do disk image backups in Ubuntu Linux 10.04

Posted on November 28, 2011 by David Hilowitz

So, I just installed Ubuntu Linux 10.04 on my trusty Toshiba Portege 3480CT8. (Yes, it works beautifully as a lightweight LAMP server.)

One of the first things I set out to do was make a disk image of my new server, so that if something goes awry, I can restore things later on.

Here’s what I did:

First, I plugged my external drive into the USB port. This got assigned to /dev/sdb.   I mounted the drive.

 sudo mkdir /media/backup_04 sudo mount /dev/sdb1 /media/backup_04 -t ntfs sudo mkdir /media/backup_04/portege-linux-backups

Next,  I installed dcfldd. This is just like dd, which comes with most Linux distributions, except that it can output time remaining (among other things).

 apt-get install dcfldd 

Finally, I started the backup:

 dcfldd if=/dev/sda of=/media/backup_04/portege-linux-backups/2011_11_28.img sizeprobe=if 

This produces an output that looks like this:

 [16% of 28615Mb] 155136 blocks (4848Mb) written. 01:17:37 remaining. 

–David

Crossposted on my tumblr.

TIP: How to get “anonymous” class functions to show up in Safari’s JavaScript Profiler

Posted on November 18, 2009 by David Hilowitz

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:

The Safari 4 JavaScript Profiler before I correctly declared my class's member functions

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:

Safari 4 JavaScript Profiler after I had correctly declared my functions

GO PROGRAMMING TIP: Where to put the ‘go.pbfilespec’ and ‘go.xclangspec’ files.

Posted on November 16, 2009 by David Hilowitz

So I was trying to get XCode syntax highlighting support for Google’s new Go language. I had located the two XCode files in the Go SRC package (these were in $GOROOT/misc/xcode), but for the longest time I couldn’t figure out where to put them. I finally stumbled on the answer (thanks to Talamathi for putting me on the right track): The files go in /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/

In short, if you want syntax highlighting support for the Go language in XCode, the following should get you there:
cp $GOROOT/misc/xcode/* /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/

CODE: A ‘Go’ Linked List Implementation

Posted on by David Hilowitz

So I’ve been experimenting with Google’s Go programming language. So far I’m liking it quite a bit. Here’s a rudimentary implementation of a Stack I made using a Linked List. As you can see, I’ve defined two interfaces — one for the Linked List functionality and one for the Stack functionality — but I haven’t implemented either fully. There’s also a main() function thrown in to demonstrate the functionality. Right now the Linked List only stores integers, but this could be changed very easily.

Click here to download:

LinkedListStack.go (1 KB)

TIP: FiddlerHook: Easier Support for Fiddler in Firefox

Posted on by David Hilowitz

You may all already know about this, but on reinstalling Fiddler I was pleasantly surprised to discover this: official support for Fiddler in Firefox. Not bad, right? It comes in the form of an extension called “FiddlerHook.”

Read more here: http://www.fiddler2.com/fiddler2/addons/fiddlerhook/

David

PS. Up until now I had been using something called “SwitchProxy” to do almost the same thing, but this is definitely better.

Posted via email

TIP: The Google Reader “Next >>” Button

Posted on July 21, 2009 by David Hilowitz

Do you use Google Reader?

Well, I can’t start my day without it.  Every morning as my first order of business I log in and read a couple local news stories while I’m drinking my coffee. After that I check out what’s going on with the art blogs I follow, then the gadget blogs, etc. Invariably, I’ll see at least five things that are simply too arresting to pass up. For those I’ll spawn new tabs and windows and I’ll keep them open for browsing later in the day. This ritual has become such a part of my life that Google Reader has now eclipsed StumbleUpon, which was previously my number one way of finding out about new stuff on the internet.

This being the state of things, it was with great pleasure that I happened across the “Google Reader :: Next >>” bookmarklet. This little button at the top of my browser solves two problems I never realized I had. First off, it allows me to view my RSS feeds in the context in which they were originally intended to be seen, i.e. on the blogs from whence they originated. Second off, because I have such a wide breadth of different blogs, I have a nasty habit of going through my RSS feeds and picking and choosing content based on the titles and first few words of each posts.  This leads me to ignore things that would be interesting to me in favor things that I think will interest me . Often the two are not the same. (For example, I don’t think of myself as someone who is particularly interested in features having to do with Google Reader although, yet here I am writing to you about one right now.) Clicking the “Next” button forces me to see content that I would otherwise have filtered out and in so doing it allows us to once again experience the joys of random, StumbleUpon-style browsing.

So that’s it. Easy to install (just drag the link from your Google Reader Settings page to your browser’s Favorites bar), a pleasure to use, without further ado I give you the Google Reader “Next >>” Button.

TIP: “Google Analyticator” Plug-In for WordPress

Posted on June 21, 2009 by David Hilowitz

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/

TIP: How to find the full URL of a file within your Application’s Bundle

Posted on June 19, 2009 by David Hilowitz

iPhone Icon 79 x 130This is an iPhone Programming tip. Say you want to find  the full URL of a file within your Application’s Bundle (mainBundle), here’s how you would do it. Example: This would return the full URL of a file named “Sound2.caf”:

CFURLRef fileURL;
NSString *path;
path = [[NSBundle mainBundle] pathForResource:@"Sound2" ofType:@"caf"];
fileURL = (CFURLRef)[NSURL fileURLWithPath:path];

Older Posts »