|
Creating
Dynamic Soundtracks Using Chunks and Flash 5
Welcome to the
second tutorial in our dynamic audio trilogy: Creating Dynamic
Soundtracks using Chunks and Macromedia Flash. In the first tutorial,
Creating Dynamic Soundtracks using Layering and
Macromedia Flash, we showed you how to make your sound
tracks more interesting by layering and controlling individual
instrument parts using Flash 5 and DoReMedia Sound Families™.
Sound Family Layers provide the "unmixed" instrument tracks necessary
to accomplish this feat. But layers are just one of three dimensions
of the Sound Family. The second dimension is Chunks.
What
are Chunks?
Chunks are pre-mixed
phrases taken out of a musical arrangement. Chunks open a whole
new world of possibilities for audio interactivity in Flash, and
in some ways, are more powerful and easier to work with than layers.
Rather than individual instrument parts, Chunks provided with
DoReMedia Sound Families are the most common song sections,
such as the verse, chorus, breakdown, intro, and outro. By shuffling
the order and repetitions of each chunk, you can easily tailor
your own musical arrangement to the timing and visuals of your
Flash project.
Why Use Chunks?
Chunks can be
implemented in a few different ways. They can be implemented almost
exactly the same way as layers, triggering 2 or more chunks on
the same keyframe, and then using volume envelopes to mute and
unmute each piece of audio to create musical dynamics. Chunks
can also be used in conjunction with a "sync track", provided
with every Sound Family, and inserted at various points across
the timeline. Using chunks frees you from the 8 part limitation
of Layers, and allows for more musical variation. Layers give
you more permutations, but less dynamic range. Think of it this
way: Layers put together make up a section of a song; Chunks
put together make up the entire song.
As
described in Tutorial 1, by using layers and volume
envelopes, we can avoid the need to force frame rates (see below).
But Layers can be limiting. You can only have up to 8 layers at
a time (muted or unmuted). You can only have up to 8 envelopes
per layer, which can become an limiting issue with longer or more
complex soundtracks. And layers can be difficult to modify - if
your movie structure changes, or you want to change the arrangement
of your layered soundtrack, you have to progressively edit every
layer's envelope many times. In these situations, Chunks can save
the day.
Chunks
are like sound Legos. You simply "attach" one clip to the next
to construct your own musical arrangement. The nice thing about
chunks and Flash is that after you use a chunk the first time,
it's "free". The file is stored in cache and can be re-used later
in your movie without increasing your file size. And you can associate
specific pages, scenes, buttons and user actions with specific
chunks, making your soundtrack truly interactive.
Forcing
Flash's Frame Rate
Flash
allows you to select a frame rate for your movie between 1 frame
per second and 30 frames per second. The two most common rates
are 12fps and 15fps, but any rate is acceptable to a tenth of
a frame per second resolution. The tricky part is that no matter
what frame rate you pick, actual playback is dependent on the
user's processor and the complexity of the movie. So even though
you may choose 12fps, your audience may only experience 10fps,
or 6fps. This poses a problem when trying to synchronize audio
and graphic elements in your Flash movie.
It's
fairly easy to synchronize the beginning of a sound clip
with an event by simply triggering the audio at the same keyframe
as your event. But what if you want to synchronize something with
the end of a sound clip, like another sound clip, as in
our Lego example? How do you know on which keyframe to trigger
your second clip? We need to know what frame the timeline is on
when one chunk finishes, so we can then trigger the next chunk
to build our arrangement.
In
order for all of this to work, we have to force Flash to keep
a precise, consistent frame rate. We could set the sound SYNC
METHOD to STREAMING for all of our sounds, but this would increase
our file size by a factor of 10 or more.
The
answer is what DoReMedia calls a Sync Track. Every Sound
Family comes with a corresponding, tempo-matched Sync track. The
purpose of the Sync Track is two-fold. It forces Flash's frame
rate to be constant, and it provides a very useful visual reference
which can be used to avoid trial and error in placing and synchronizing
sound clips.
What
is a Sync Track?
A
Sync Track is a one measure sound clip that is recorded at the
same tempo as the Sound Family. It is a multiple in length of
every component (layers and chunks) in a Sound Family. It also
has an audio spike at the beginning of the clip, which provides
the visual reference on your Flash timeline that corresponds to
every musical measure. By inserting this low-resolution clip throughout
the length of your movie soundtrack with a SYNC SETTING of STREAMING,
we can force Flash's frame rate to be constant and determine when
to trigger the next chunk.
Using Chunks and the Sync Track to Build a Custom SoundTrack
In
the following exercise, we will create a background track using
DoReMedia Sound Family chunks that will save over 50% download
time versus streaming the same amount of audio:
| Begin
by setting your frame rate from the MODIFY>MOVIE dialog
box. We will use 13 fps for this exercise because it is an
optimized frame rate for the musical tempo of our soundrack
(see "Dealing With Seams and Timing Inconsistencies" below).
Then IMPORT your audio components and sync track into your
Flash movie. In this example we will use Spankin_intro.aif,
Spankin_A.aif, Spankin_B.aif, and Spankin_break.aif. ADD 6
new LAYERS and rename them to match your audio components
- including your sync track: "Sync", "Intro", "A", "B", "Break",
and "Outro" {figure
1}. |
 |
 |
Next,
drop your sync track onto your timeline by selecting SYNC_130.aif
in the Sound pulldown menu of the SOUND PROPERTIES dialogue
box. Set the SYNC METHOD to STREAMING and enter 50 in the
LOOPS box {figure 2}.
Click
the EDIT button. Drag the volume envelop handles down to
the bottom to turn the volume for this track off {figure
3}.
|
| Scroll
right, select frame 600 on the sync track and INSERT FRAME.
This will extend a visual representation of the sync track
on the timeline . You should be able to see the spikes in
the waveform display on the timeline, indicating the beginning
of each measure. Now you're ready to start building a custom
musical arrangement.
Here's
where the fun begins! Select frame one of the second track
of your movie and add the sound Spankin_intro.aif using
the sound properties dialogue box. Make sure that the SYNC
METHOD is set to EVENT {figure 4}.

|

Once again,
to see where on the timeline the sound clip ends, you may
have to INSERT FRAMES after each sound keyframe. Add enough
frames so you can see the end of the waveform display. Notice
how the waveform of the intro track ends perfectly at the
end of frame 48, with no extra space. And notice that the
spike on the sync track displays perfectly at the start
of frame 49 {figure 5}.
|
| This is
due to the precise timing of Sound Family components, and
allows for seamless audio synchronization.
On Frame
49 of track A, INSERT KEYFRAME and add the sound Spankin_A.aif
{figure 5}. Again, make
sure you are setting the SYNC METHOD to EVENT. Set the LOOP
parameter to FOUR (4). {Follow this same proceedure as
we add more audio tracks}
|
 |
This will take us to frame 239. On frame 240 of track B, add
the sound Spankin_B.aif. Set the LOOP parameter to TWO (2)
for this clip {figure 6}.
You should now be at frame 337.
At frame
338, add the sound Spankin_break.aif on the track labeled
Break, and set it's LOOP parameter to TWO (2)
{figure 7}.
|
 |
 |
Now go back to track A,
frame 433 and add another instance of Spankin_A.aif Set it's
loop parameter to 2 {figure
8}.
Finally, we are ready to wrap up our arrangement with an ending.
On the one remaining unused track labeled Outro, insert
Spankin_outro.aif at frame 529 {figure
9}.
|

|
 |
|
We now
have all of our component pieces on the timeline. You can
play your movie to hear the arrangement you just created.
|
Using
the Sync Track's Waveform Display to Help Create Dynamics
Lets
IMPORT two more components from our Sound Family called Spankin_fill_01.aif
and Spankin_crash.aif. Sound Family chunks have been engineered
without drum fills and cross-phrase melodies for looping purposes.
Because of the uniqueness of every multimedia project, having
fills and melodies as part of the chunk would be a disadvantage.
But fills and melodies add impact and dynamics, right? Isn't that
why traditional loops get so mundane?
The
answer is, yes. Loops alone are almost the opposite of dynamic
and compelling. However, using the sync track and layerable audio
components like drum fills, give you the ability to add these
impact building elements back into our mix... when YOU want them.
Fills
provided with Sound Families are always edited to be one or two
full measures in length. This means that they will always align
with a waveform spike on our sync track.
|

|
ADD
a new LAYER and label it "FILLS". Lets look on our timeline
to find frame number 240. This is where we switch from Spankin_A
to Spankin_B.Go back one spike to frame 217 and insert a
new keyframe {figure
10}.
Add
the sound Spankin_fill_01, with a SYNC METHOD of EVENT.
Not
bad, but there is one more thing we need to do to really
give it punch. We need a cymbal crash at the end of the
fill. ADD another LAYER and label it "CRASH". On frame 240
of this track, INSERT a KEYFRAME and select the sound Spankin_crash.aif
from the sound menu {figure
11}.
 |
|
Repeat
the same process throughout your soundtrack to suit your
taste. I have put the fill and crash on some transitions,
while using only the crash on others.
Give
it a play. You may need to adjust your volume levels so
the drum fill and crash are mixed properly with your chunks.
|
Dealing with Seams and Timing Inconsistencies
Seams
are small gaps or pauses between chunks or loops that are placed
back to back. Depending on processor speed, playback quality may
vary within the Flash application, causing small seams between
chunks. However, if all chunks have been inserted in the correct
frames, this should not be a problem upon export to SWF format.
If
seams still exist in your exported movie, there are a couple of
possible causes and resolutions.
The
first reason you may experience seams is due to mis-matched frame
rates and beats per minute. Flash's timing method is frames per
second, while music is measured in beats per minute. The average
ear can hear a 3 millisecond (3/1000) gap in a solid music stream.
So, if your frame rate is set at 10 frames per second, and your
first chunk ends in the middle of a frame, you will have a 5/100
of a second space (50/1000 or 50 millisecond) before the next
chunks starts, causing a seam. This problem is solved by choosing
frame rates and beat-per-minute rates that divide evenly. A simple
equation to use is: Beats per minute divided by frames per second
must be a whole number. For example:
To
illustrate this better, go to MODIFY > MOVIE and change your
frame rate to 12 FPS. Notice in the timeline that the audio waveforms
no longer end precisely at the end of a frame.
All
DoReMedia Sound Families are recorded at optimal BPM rates and
engineered to have timing accurate to 1 millisecond.
If you are using frame-optimized
sound files such as a Sound Family, and still experience timing
inconsistencies upon export, there are a couple of work arounds.
- Re-export
your movie. Sometimes the process of encoding MP3 files can
make slight variations in the length of the audio file.
- Stagger the
start of your sync track and the start of your chunks by selecting
all frames and sliding them back to frame 5 or so. Then move
the sync track back up to frame one {see
figure 12}. This will give the sync track
a little extra time to "take hold". It's best to do this just
before publishing your movie so you can take advantage of the
visual reference of the sync track during production.
More
Tips and Tricks
- Because Chunks
do not need to start on the same keyframe to stay in sync, they
can be targeted more easily with mouse events and action scripting.
If you create your soundtrack as a separate movie clip, you
can use tell targeting to instruct your soundtrack movie to
begin playing at a various keyframes, depending on user choices.
This technique can make your soundtrack interactive to a whole
new level.
- If a sync
track is not desirable for your project, try using Chunks just
like layers. Trigger them all at the same keyframe and then
use volume envelopes to mute and unmute them as needed. Depending
on your project requirements, you might find this method will
save you time and/or file size compared with using the LAYERING method. Just remember that Chunks
are pre-mixed, so they will not sound good if more than one
plays at a given time.
- Chunks and
Layers can be used in combination throughout a soundtrack to
create endless possibilities. Layer a lead line on top of a
breakdown...Mute the last bar of the A section and insert a
bit of the percussion track to create a dynamic effect...Use
layers to make a changing background track, and then on a mouse
click, trigger sound effect along with the B section to make
a stunning transition. Another benefit is that very often you
might find one chunk that incorporates all the layers you want
to use, significantly saving on file size.
- Just before
publishing your movie, delete all of the frames on your sync
track, except the first one. Technically, Flash only needs a
single keyframe with a sound set to the streaming method to
"kick" it into forced-frame mode. This will save you considerable
file size.
[
back ]
|