Probably the most unfunny book I ever read in my life was Sigmund Freud's Jokes and The Relationship To The Unconscious Mind. Boy, that man knew how to kill a joke. E.B. White said, "Analyzing humor is like dissecting a frog. Few people are interested and the frog dies of it."
The best writing on the subject of the mechanics of laughter was a chapter of Desmond Morris' book Manwatching: A Field Guide to Human Behavior. Morris said, in essence that a laugh is combination of two rapidly successive emotions. It is a cry quickly followed by a sigh of relief. This makes a lot of sense. When we are born we come out crying. We had a nice rent free apartment for nine months and suddenly we are evicted and thrown out into this scary world. When you are a baby, everything is scary. Noises upset you. Feelings of hunger upset you. Shitting yourself scares you. So you cry. And at first your eyes aren't fully developed, so all you see of people are big scary shapes. So you cry. But there is one big shape that seems to take care of you and protect you. It's different from the other big scary shapes. That shape is called Mom. So, this shape approaches you and your first reaction is to cry, but almost immediately after that reaction, you realize it's Mom and you sigh with relief. Mom makes you laugh.
So laughter is a reaction to something that seems threatening, but turns out to be safe. Let me give you a couple of examples.
When most people ride a roller coaster, they scream because they are scared. When I ride a rollercoaster, I laugh for the whole ride. People think I'm nuts. But I am reasonably assured when I'm on a rollercoaster at Disneyland or Las Vegas, that I am going to survive the ride. That feeling of safety is my sigh or relief. No matter how threatening that ride seems to be, my feeling of safety lets me relax and laugh. (Now if I was riding a rollercoaster at a County Fair where I'm not sure if the tatooed ex-con working for minimum wage who is running the ride, and just set it up last night and has to set it up in the next town in a couple day, so he might not have tightened up all the bolts, then I'm not sure I'm going to survive this ride and I will definitely scream).
Or your big brother might start tickling you and it makes you laugh. It is an assault on your person, but you know you aren't really getting hurt, so you laugh. You tell him to stop. He doesn't stop. You are still laughing. You ask him to stop again. He doesn't stop. You aren't laughing so much. Then you plead with him to stop and he doesn't stop. Now you are crying, because the threat is getting serious.
Comedy is an tickling assault. If i actually tickled you, I could be arrested for assault. But if I do it right, I can stand up on stage and tickle somebody in the back row of the theater with my words. Underneath comedy is an implied violence. If a comedian makes the audience laugh, they come backstage and say things like, "I killed them. I slayed them". If the audience doesn't laugh, the comedian comes backstage and complains, "I died out there."
There are two parts to a joke. The first part is THE SETUP. This is the part where I talk about something everyone is familiar with. This is usually followed by a pause, where you let that sink in and know everyone is on the same page. The second part is THE PUNCHLINE (more violent imagery). This is where you give it a twist. You subvert everything you just said in THE SETUP. THE PUNCHLINE is an assault on the audience's logic. So they go through the stages of "Hey, wait a minute. That wasn't what I was expecting. Oh, he's only kidding." The audience is safely attacked, so they laugh.
My Dad used to watch all the comedians on TV. He had a million jokes and loved telling them. He lectured me, "Never laugh at your own jokes. People kill jokes by laughing at them. They start laughing and tell you 'This is the funniest joke you ever heard". So they are making your expectations too high and no joke can fill the expectations. Just tell the joke straight and if they don't laugh, move on to the next joke. My Dad burned that advice into my DNA so that anyone who knows me can see the clues that I am going to tell a joke. I get very serious and then deliver the zinger.
In the very first college animation class I taught, one student pissed me off all semester. He picked up on when I was about to tell a joke and sandbagged me every damn time. I would tell THE SETUP and pause.........From the back of the room, I would hear him go, "Two, three, four." He fucked up my timing on every joke the whole semester. I wanted to kill that kid. But every semester, I would assign my animation students to do their own short piece of animation. They had to come up with the idea themselves and execute the animation on their own. Of all the students, he was the only animator whose gags had perfect timing. Every slapstick gag, went two, three, four bang, two, three, four bang, two, three, four bang, etc. The timing had sunk in and I gave him an A.
I will write more about comedy in