“… the code is more what you’d call ‘guidelines’ than actual rules.”
Pirates of the Caribbean: The Curse of the Black Pearl
A bit of common, but terrible, advice I see on playing comedy is to treat it the same as drama. There’s a grain of truth in that, but it’s a grain that’s embedded in a low-fat, sugar-free breakfast pastry of lies. Sure, you can deploy the same tools that serve you well in drama—active listening, committing to a clear and specific intention—but you also have to be aware of the effect you’re trying to create. You’re trying to make the audience laugh. You have to choose comedy.
While the character you’re playing shouldn’t be aware that they’re in a comedy, you, the actor, absolutely must.  Actors bring the text to life—by giving it voice but also through interpretation—that is, by making choices and animating those choices on stage.  For any given speech there may be a number of valid interpretations—thoughtful, grounded in the text, consistent with the character—but that doesn’t mean they’re funny.
This is a particular problem with Shakespeare where many of those involved—actors and audience alike—yearn to be taken seriously, and humor is often the victim.
Some years ago, the BBC filmed every Shakespeare play, creating an incredible audio-visual reference library of his work—invaluable in the days before YouTube and streaming productions.  The quality varies from excellent  to mediocre. Near the bottom of the list is their production of my favorite Shakespeare comedy, Love’s Labour’s Lost. No one involved seems to know the play is a comedy and it presents as a particularly stiff period drama.
By contrast, my favorite example of an actor absolutely wringing the humor from a speech comes from my 2004 production of the same play. Not that I’m claiming credit here. I heap all praise on the actor, Joanna Sotomura. 
In the first scene of Act Three, Don Armado offers the clown Costard “remuneration” for carrying a letter to his love, and Costard clearly has no idea what the word means. Once he’s on his own, he examines what he’s been given:
Now will I look to his remuneration. Remuneration! O, that’s the Latin word for three farthings. Three farthings—remuneration. “What’s the price of this inkle?” “One penny.” “No, I’ll give you a remuneration.” Why, it carries it. Remuneration!
There’s a joke there—that Costard believes that remuneration is the literal term for three farthings and not compensation generally—but it’s pretty thin. The actual comedy comes in his reaction to that discovery and his attitude in deploying his new vocabulary in the hypothetical negotiation that follows. Which Joanna played brilliantly (and hilariously). Where she took it to the next level was in the pronunciation of “remuneration,” deciding, apparently, that at more than 10% of the total word count, nearly 40% of the total syllable count of the speech, that the word itself had better be funny.
That’s a dangerous game. It’s easy to be conspicuously “funny” without being, you know, actually funny. She tried. And failed. And tried again. And failed again. Every night she came into rehearsal with a different pronunciation, like Edison testing lightbulb filaments. For weeks. Until one night she hit on something that had the cast rolling. To this day I can’t articulate why—it just sounded funny the way she said it. She locked it in—and come performance, she had the audience rolling too.
That is a commitment to comedy. That is a choice to be funny. You can’t get there simply by playing your intention.
So that’s Rule One—choose to be funny.
And that’s where I must, for now, leave you, rendering this entire post an 800-word version of the most dickish director’s note ever, “Can you do that again … but funny?”
Sorry! More rules next time, including lessons from commedia dell’arte (Wear Your Heart On Your Sleeve) and from screenwriting (The Ratchet).
 This post is a bit off my usual beat, but Stephanie Keiko Kong challenged me to write something about playing comedy, and this a partial response. I’m parking it here, although it has almost nothing to do with writing, until I set up a second blog for theatre topics.
 I suspect this is what most people actually intend to convey with this advice.
 The actor’s interpretation is one of the main reasons it’s so much easier to understand Shakespeare in performance than reading it on your own. Clear acting intention can render unknown vocabulary and unusual word order sensible.
 The BBC productions were created to be filmed. They were recorded without an audience, so the camera is a bit freer than it could be with a conventional production, not limited by the proscenium, but they retain the feeling of stage plays.
 The BBC Othello is particularly good, featuring Anthony Hopkins as Othello and Bob Hoskins as Iago.