Monday, December 15, 2008

Musical numbers from my shows

After years of vague promises to cast members to provide a record of the shows that Jeff Sanzel and I have written together for Theatre Three children's theatre productions, I finally got up my courage to edit together the tapes I'd made into more or less coherent individual musical numbers. I've been posting them to YouTube, Facebook, and MySpace as I finish them.

The tapes were made by setting up a camera (or two) before each performance, pointing it towards the stage, turning it on, and leaving it there unattended. In some cases I also recorded a separate audio track with a decent stereo mic. There are several problems with this approach:
  • The camera is stationary, so any zooming or panning has to be applied after the fact. This makes for blurry closeups.

  • The autofocus is often confused by stage lighting changes.

  • Each performance is slightly different, so synching lip movements can be tricky. I got it wrong in several instances.

  • The mic in the camera is not as good as the separate stereo mic, and the sound quality varies depending on where the camera is placed. So only The Fairy Princess has good sound.

But I hope the end results are entertaining, if only for the performers who took part in the productions.

Eventually I'd like to create a video or sequence of videos covering an entire show, for watching in a YouTube playlist, for example. I made studio recordings of Hansel and Gretel and The Fairy Princess (and I hope to do so for The Elves and the Shoemaker), so it is possible that I could use that material for the soundtrack.

Thursday, September 25, 2008

New CD: "Colloquy"

I am once more proud to announce the release of a CD that I produced: Colloquy, an album of music by Gary William Friedman. And once more, I am several weeks late in my announcement. Maybe I planned it that way. Yeah, that's it.

I wrote the liner notes for this album, and I won't repeat them here, so go get a copy and read them. Or don't read them, just listen to the music -- I don't mind.


There's also a video about the making of one of the pieces on the album.

Thursday, July 24, 2008

New CD: "Before Love Has Gone"

I'm proud to announce the release, one month ago, of a new album from Stevie Holland, Before Love Has Gone, that I co-produced with Todd Barkan and Gary William Friedman. (The actual release date was June 24, but I kept forgetting to blog about it and decided to wait out the full month.)

Go get it and listen to it. The whole album is great, but if you're really stingy and can only spring for one tune, I recommend "Lazy Afternoon". It's phenomenal.


There's also an EPK for the album.

Resource dependency injection in Restlet via Guice

(See a more recent posting on this subject.)

I have a body of code that already benefits from Guice dependency injection, and I want to migrate it from a servlet-based architecture to Restlet without losing those benefits. I've had some success, and I figured I'd report on it.

I don't mean that I wanted to use Guice to wire up an object graph of Restlets (Components, VirtualHosts, Applications, etc.). It's straightforward enough to use the builder-like API of Restlet, and such code is nicely confined in a few places where it doesn't bother the meat of the application, its resources.

What I do want is to have those resources created by Guice, so that they can be constructed with dependencies injected into them. With the Finder approach, resource constructors get a Context, a Request, and a Response, but that's it. I suppose I could find a way to stash an Injector in one of these so that resources could look up the dependencies they need, but I wanted something more direct. I came up with the following scheme, which seems to be working pretty well:

I use a custom Finder that knows how to look up a Handler/Resource by class or Guice key -- instances of these custom Finders are provided by a FinderFactory:
public interface FinderFactory {
    Finder finderFor(Key<? extends Handler> key);
    Finder finderFor(Class<? extends Handler> cls);

The class RestletGuice has static methods named createInjector that parallel those of the Guice class. The difference is that it adds bindings for Context, Request, Response, and FinderFactory. In my Guiced version of the FirstStepsApplication from, the following lines create an Injector with some bindings and then look up the FinderFactory that will produce Finders that will be able to make use of those bindings. (These bindings are not necessarily good practice; they just demonstrate the technique.)
    Injector injector = RestletGuice.createInjector(new AbstractModule() {
        public void configure() {
                .to("Hello, Restlet-Guice!");
    FinderFactory factory = injector.getInstance(FinderFactory.class);

HelloWorldResource is slightly changed. It has a private final field, msg, that is used to generate the text representation. The msg field is initialized via an injected value.
    @Inject public HelloWorldResource(@Named(HELLO_MSG) String msg,
                                      Request request,
                                      Response response,
                                      Context context) {
        super(context, request, response);
        this.msg = msg;
        getVariants().add(new Variant(MediaType.TEXT_PLAIN));
    static final String HELLO_MSG = "hello.message";

This all comes together in the Application class when attaching a Finder for the default routing.
    Finder finder = factory.finderFor(Key.get(Handler.class, HelloWorld.class));
    Router router = new Router(getContext());
    return router;

I read this as "Route any request for this application to whatever resource is bound to @HelloWorld-annotated Handlers, injecting that resource's dependencies," which was exactly what I wanted.

For those who don't want to have to call a special RestletGuice method, there is a public class FinderFactoryModule extending AbstractModule that can be used with Guice.createInjector(...) to get the same effect.

FinderFactoryModule also implements FinderFactory, so you can construct an instance in your Restlet wiring code and use it right away. You can then use the FinderFactoryModule to create an injector explicitly.

As a special convenience, if you don't use a FinderFactoryModule to create an injector, one will be created implicitly the first time one of its Finders is used to find a target Handler/Resource. This encourages a style where each Application gets its own implicit Injector by creating a local FinderFactoryModule and using it to create Finders.

That's basically it. It works with plain Guice 1.0 and Restlet 1.1 (since it uses Handler as the base type for all Resources). I haven't had time to package it nicely, but you can follow the links below for the actual code.

Sources (links are out of date, use this instead):

Example (links are out of date, use this instead):

Update (August 2008)

Chris Lee discovered that Context.getCurrent() doesn't work reliably as of 1.1m5; the workaround is to use Application.getCurrent().getContext(). A more comprehensive fix, that I hope to post soon, would involve letting subclasses of FinderFactoryModule override the methods that create the Providers for Request, Response, and Context.

Update (2009-Feb-3)

Leigh Klotz has a workaround for using Guice Finders with WadlApplication. And I still haven't had time to package any of this more nicely. (Feb 7: Jérôme Louvel took Leigh's suggestion and checked it in on the Restlet trunk.)

Tuesday, April 22, 2008

Concert at Kosciuszko Hall

I attended a lovely concert at Kosciuszko Hall in Manhattan on Monday night. Cellist Mairi Dorman-Phaneuf and composer-pianist Joshua Rosenblum performed works by Schumann, Brahms, de Falla, Prokofieff, Rosenblum, Bolling, and others, assisted by soprano Joanne Lessner, bassist Bill Ellison, drummer Bruce Doctor, and special guest Julia Murney.

Mairi's particular interest (she referred to it as an obsession) is in performing songs with the cello taking the voice part, and she made a compelling case for her obsession in the songs of Schumann, Brahms, and de Falla. I particularly liked Brahms' Wie Melodien.

The concert included the world premiere of Josh Rosenblum's setting for soprano, cello, piano, and contrabass of T. S. Eliot's poem, The Love Song of J. Alfred Prufrock. I liked it a lot, and I hope to make a recording of it soon so it can be shared with others.

I was very pleased to see that the three CDs on sale in the lobby were all produced (or co-produced) by me! Not surprising, of course, because they all feature Josh Rosenblum's music:There is another Peierls-produced Rosenblum album, Impetuosities, but it wasn't on sale at the concert.

Another world premiere of Josh's music can be heard at the upcoming performance of the dance company, The Chase Brock Experience. Chase Brock commissioned a ballet from Josh, and I produced a recording of the piece for use during the performance. It's called ... are you ready? ... Cut to the Chase.

Saturday, February 02, 2008

Magic in the City

If you're looking to hire a magician for a New York City area children's birthday party, Jazzo the Great comes highly recommended:

Card Riffle

Wednesday, January 16, 2008