• No results found

A long time ago in a galaxy far, far away (Hollywood), a sound designer named Ben Burtt created the iconic sound of the lightsaber for the first Star Wars film.1 That humming, buzzing sound is instantly recognizable, and the electric crackle of two lightsabers in close contact lent an extreme, visceral tension to those saber battle scenes.

Lightsabers don’t exist, but onscreen they sounded exactly as you’d think they should, which made them completely believable. That’s excellent sound design. No one could accuse us of setting our sights low by taking on the sound of the lightsaber; it’s our last stand-alone sound effect before we turn to creating effects for specific platforms.

There’s a lot going on with a lightsaber that we could try to model, but for this patch, let’s stick with three elements:

• The activation, or unsheathing/sheathing

• The idling hum once it’s activated

• The higher-pitched, louder hum of the swing

That’s plenty for a good-sized patch. We’ll get to see in action a few techniques we’ve talked about in previous chapters, and you’ll learn about a few more that will come in handy as you make your own sound effects.

Analysis

How Ben Burtt designed and discovered the lightsaber sounds is a relatively well-documented piece of sound-design lore. Searching around the Web, you’ll find the details in a number of places. Here’s a great video of Ben himself describing the lightsaber-design process.2

The sound is a combination of two sources: a recording of a warm, buzzing movie projector and a recording of the interference caused by a television

1. http://en.wikipedia.org/wiki/Ben_Burtt

2. http://www.youtube.com/watch?feature=player_embedded&v=i0WJ-8B6aUM

induced into a microphone. The swinging hum of the lightsaber cutting through the air was the result of playing that same sound back over speakers while recording it using a mic swung back and forth in front of the speaker in time with what was happening onscreen. This produced a realistic, dynamic sound, and because of the Doppler effect the frequency increases a half a tone or so.3

For my preparation I downloaded a bunch of lightsaber sound effects from the Web, listened to videos, and read an online tutorial on re-creating the lightsaber sound without the aid of a digital signal processing tool like Pure Data.4 I used the frequencies discussed there, verifying them using frequency analysis in Adobe Audition and by using my own ear. The patch will have a lower-frequency buzz at 38 Hz, and a higher-frequency electric hum at 92 Hz. When it re-creates the swing it will pitch up the hum to 97 Hz.

Approach

To describe the approach the patch takes, I’ll explain each part we’re planning on reproducing. Don’t worry if each bit isn’t clear in isolation; if the description is unclear when you read it, listen to the part it describes and hear what it’s describing.

To re-create the higher, humming sound, we’ll use a square wave. A sine wave won’t work because it’s too basic and boring. A ramp wave is no good; it’s too rich in harmonics. A triangle wave is rich in harmonics, too, and dull-sounding. A square wave, with its odd harmonics, sounds right for an electric sort of hum. To re-create the low buzzing sound, we’ll use a custom wave.

For both of these, we’ll use a wavetable.

To give the idle lightsaber the effect of a little motion we’ll use a chorusing effect, which I’ll explain in a moment. For the unsheathing and sheathing sound, we’ll use white noise and an effect called flanging.

For the swing we’ll use the square wave sound of the idle at a higher frequency, louder than the idle sound, and distorted a bit. Let’s look at the patch and explore how each part is modeled.

The Patch

Let’s dig right into Pd. You can certainly try to follow along and re-create this patch from scratch, but remember that the completed patch is in the code

3. http://en.wikipedia.org/wiki/Doppler_effect 4. http://www.dblondin.com/071807.html

downloads. I recommend playing with the completed patch first to hear each part so the sound is in your head as we dig into how it’s made.

Here is an image of the completed patch.

Panning_and_Output

r buzzfreq r idlehumfreq ;

buzzfreq 38;

Since this patch is pretty complex, I’ve used canvases to visually separate the different sections. These are the gray boxes with titles.

A Word About Canvases

To create a canvas, use the Put menu or the key sequence CBC. Then right-click in the top-left corner and select Properties. It’s not simple to resize the canvas the way you want, but playing around with the width and height values and pressing Apply will eventually get you the right size. To get a canvas to sit behind objects already on the screen, you may have to cut and paste the objects since the only way to control the foreground order is to change the creation order.

Now let’s discuss what’s happening in each of the sections separated by the canvases.

Setup and Testing

In the section titled Setup, pictured in the following image, we set some initial values and build the wave tables used in the rest of the patch.

Setup

loadbang

;

buzzfreq 38;

idlehumfreq 92;

swinghumfreq 97;

chorusrate 0.117;

chorusdepth 0.3;

pd tables

A loadbang triggers the message, which sets the frequency of the buzzing, humming, and swinging sounds. It also sets up the chorusing effect the idling section uses.

Let’s take a look inside the table subwindow to see the wavetables set up.

loadbang

;

highhum sinesum 2048 1 0 0.333333 0 0.2 0 0.142857 0 0.111111 0 0.090909 0 0.076923 0 0.066667;

highhum normalize 1;

lowbuzz

highhum

The highhum table is set up with a square wave using the technique from the last chapter. The lowbuzz table is set up using a new technique, though.

As you may remember from when we first talked about arrays, there’s an array properties option labeled Save Contents. This will cause any data in the table to be saved along with the patch. Here I turned that option on and drew a wave shape into the graph using my mouse. You can use this technique to create custom waves.

At a low frequency, this wave gives a nice mechanical, buzzing sound. Its shape is interesting because it has a large positive and then negative jump, but then settles down for the remainder of the cycle nearer to the middle, or zero. Because of this burst of energy and then the rest of the period with little energy, it causes a discontinuous tapping sound at very low frequencies, like 1–5 Hz. As it gets higher in frequency the buzzy character stays with it, so it works perfectly for our goals. If you’d like, try re-creating a wave like this and using a tabosc4~ to experiment.

Finally, next to the Setup section, there’s a section labeled Test_Messages (Pd doesn’t like spaces in its canvas titles). These messages (pictured here) show how we’ll control the patch’s functioning.