Classic Computer Magazine Archive START VOL. 3 NO. 4 / NOVEMBER 1988



by Jim Kent

START presents a full-blown editing suite for your Cyber Paint animated masterpieces! The Audio-Video Sequencer by graphics guru Jim Kent is more than just a dubbing program--it's a full-fledged editing system that lets you control the speed and timing of up to 256 tracks of low-res color video and sound information files.

Turn your ST into a mixing studio with AVS.ARC on your START disk!

Many people enjoy creating their own computer animations with Cyber Paint, sold by The Catalog. (I wrote Cyber Paint as an extension of the "Flicker" program, published in the Summer 1987 START.) With Cyber Paint you can create your own ST cartoons or do post-production touch-ups on CAD-3D animations.

But even Cyber Paint needs more bells and whistles. For instance, what would cartoons be without crashes and bangs as coyotes fall off cliffs and refrigerators fall on rabbits' heads? What would science fiction films be without the pulse of laser beams and the roar of rockets as spaceships swoop over alien planets?

Yep--what Cyber Paint needs is sound. You need the ability to add music and sound effects to your animations.

Well, now you have it.

Enter AVS!

With the Audio-Video Sequencer (AVS) you can add digitized sound tracks to your Cyber animated sequences. Not only can you have bells and whistles, you can have music, voices and even things-that-go-bump-in-the-night. Anything you can record on tape can be played back with a Cyber Paint animation file. Your only constraint is the memory available in your ST--and you'll find that sound tracks generally take up considerably less RAM than video tracks.

There is a catch: AVS is just an editing program. It won't create video or sound; it just organizes tracks and mixes them together. You can find many video (.SEQ) and sound (.SPL) files on CompuServe, GEnie, at users groups and elsewhere, but to create your own you'll need Cyber Paint for video and MichTron's ST Replay for sound. There are also a number of.SND files available on the same online services; these are .SPL files with a minor modification. If you change their filename extenders to .SPL, AVS will have no trouble loading and playing them. You can also play Aegis Animator ST .STR files, but they must first be converted to .SEQ files with Cyber Paint.

Getting Started

Copy the files AVS.ARC and ARCX.TTP onto a blank, formatted disk and un-ARC the file following the Disk Instructions elsewhere in this issue. Because Audio-Video Sequencer works with low resolution animation sequences only, it requires a color monitor. Double-click on AVS.PRG in either low or medium resolution. A medium-resolution screen will appear with a menu bar at the top and fourteen track lines below. This is AVS's Edit Decision List screen.

To get some idea of the power of AVS, load the demo that came on your START disk (in AVSDEMO.ARC) by clicking on Load under the AVS Menu and selecting DEMO.AVS. Be sure that the three files, LASER.SPL, ENGINE.SPL and LASER.SEQ are on the disk in your A: drive with AVS.PRG. After it's finished loading, you'll see that there are entries in the first three tracks. In the Filename space on the left, you'll see the names of all three component files. The sound tracks, LASER.SPL and ENGINE.SPL, are shown in red and the video track, LASER.SEQ in green. The three associated tracks together are called a scene. Two or more scenes make a movie, (even though it's video). Press the P key to play (or select Play Once from the AVS Menu).

The animated LASER demo was created by Associate Editor Jon A. Bell and began as DEGAS artwork. The ship is the "Narcissus" shuttlecraft from the movies ALIEN and ALIENS; the deepspace background was created with Tom Hudson's Anti-aliaser desk accessory. (Editor's Note: Watch Cyber Corner in upcoming issues of START for Jon Bell's tips on creating the effects in the LASER demo. Also, more demos are available on Antic/START Online in CompuServe; log onto CompuServe and type GO ANTIC.)

Putting It Together

Let's take a look at DEMO.AVS; it should still be loaded into AVS. On the left side of each track are the filenames for all tracks. The next columns show the StartTime and StopTime points for each track in ticks (a tick is one-sixtieth of a second). The Track Bars next to the StopTime column represent visually where each track occurs in your scene. You can rearrange audio and video tracks by pointing and left-clicking on a Track Bar and dragging it left or right, or by left-clicking once where you want the track to start. You'll see the StartTime and StopTime numbers change as you move a track.

Although there are only 14 tracks visible on a single page of the Edit Decision List, there are actually 256 tracks available on twelve pages. To change to a different page or to scroll the Edit Decision List window up or down, use the movement options on the Window Menu.

You may find that the sound tracks in DEMO.AVS play too fast or too slowly (Unfortunately, .SPL files don't save any speed information.) You can adjust their speed from the Examine Track screen. To access the Examine Track screen, right-click in the Track Bar area for that track. (Don't worry if you don't remember all the places to right and left-click; these are shortcuts which you'll come to appreciate later. All of the functions are available on the dropdown menus and most also have mnemonic keyboard equivalents as well. The Examine Track screen, for example, is accessed by clicking on Examine on the Tracks Menu or by pressing the X key--eXamine-- while the mouse cursor is over the Track Bar area.)

The Examine Track screen has two sliders: the top one controls the speed (1 is slowest) and the bottom one controls how many times to loop (repeat) the track. To preview a sound track (prehear it?) while in the Examine Track screen, left-click anywhere on the heading bar of the Examine Track screen.

You can Examine a video track as well. Just call up the Examine Track screen in the same manner as for a sound track. You can adjust the playback speed and the looping of a video track just as with a sound track--and preview it by left-clicking on the heading bar.

Once you have the sound tracks timed correctly, you just need to set their StartTimes (or StopTimes) so that they will synchronize with the action on the video tracks. Slide the Track Bars to where you think they belong and select Play Once from the AVS Menu (or press P). To make fine timing adjustments, you can click on the StartTime and StopTime boxes for that track. A left-click on the StartTime box will move the StartTime one tick earlier; a right-click there will move it ten ticks earlier. Similarly, a left-click on the StopTime box will move the track one tick later and a right-click will move it ten ticks later.

START's AudioVideo Sequencer. Although there are only 14
tracks visible on a single page of the Edit Decision List,
there are actually 256 tracks available on twelve pages.

To save your work press S or select Save from the AVS Menu. Type ALIENZAP.AVS in the file selector (or whatever name you choose; the .AVS extender is for convenience only). The Audio-Video Sequencer saves a short ASCII file with one line for each track on the Edit Decision List, with the full pathname for each .SEQ and .SPL file including the disk and folder from which it loaded the track. However, when loading an AVS file, AVS will look in the current folder as well as that specified in the file. Thus you can create an AVS movie on your A: drive and play it back on your B: drive, as long as all the tracks are together in the same folder. If you are creating a movie to show on another computer, be sure that all of the component tracks are in the same folder as the .AVS file when you load and save the tracks.

AVS And The Basic Space Epic Opening Sequence

Now that you've played with the demo, let's try a Mega-sized project. (Unfortunately, all of this just wouldn't fit on your START disk, so you're on your own here!) Select Clear All from the AVS Menu to clear the Edit Decision List and buffer. Then, to keep perspective on the overall movie, select Duration from the Time Menu and move the seconds slider to 30. This sets your overall movie length to 30 seconds. Let's begin with your Basic Space Epic Opening Sequence. The Aliens are invading! You'll need a spaceship zooming across a starfield shooting a blue force ray (CAD-3D animation with Cyber Paint opticals), a closeup of an oozing, quivering green alien with tentacles, a few animations of explosions and a rotating earth (try CLRGLOBE.SEQ on CompuServe). For sounds, let's use some laser sounds digitized from your favorite science fiction thriller, some digitized explosions from the same source, maybe an alien voice delivering an invitation to surrender and, of course, lots of cackles and mush sounds. And don't forget the Wicked Witch of the West's cackle from The Wizard of Oz (which is actually available on GEnie) and the sound of wet oatmeal dropping three feet onto a linoleum floor. All in all, the perfect ingredients for our space thriller!

Perhaps you want to open with six seconds of an animation called, say, SHIP.SEQ showing a clunky spaceship wobbling through space and then cut to the laser-firing alien ship. Load all of your component files for the SHIP scene: SHIP.SEQ and perhaps a low whoosh (WHOOSH.SPL) followed by a clank synchronized with the wobble (CLANK.SPL). Left-click in the first Filename space and select SHIP.SEQ. Loading a sound track is just as easy--just right-click in the Filename space where you want the sound file to go.

If your original SHIP.SEQ animation is half as long as you want, right-click over the SHIP.SEQ Track Bar and set it for two loops in the Examine Track screen. When you return to the Edit Decision List, the SHIP.SEQ Track Bar will be twice as wide and the track duration (StopTime--StartTime) will be twice as long.

Adjust the whoosh and clank sound tracks to be in synch with the first loop of SHIP.SEQ. This is largely a trial-and-error process. Set the .SPL Track Bars where you think they should go and Play Once. If it's right, go on to the next step; if not, re-adjust the timing and Play Once again. Do this until you have it to your satisfaction.

Now select capture from the Block menu, click on the WHOOSH.SPL track and then on the CLANK.SPL track to set the range of the block to capture. AVS will store a copy of this block in its capture buffer. Select Paste from the Block Menu and left-click on the first empty track below CLANK.SPL--about where the second loop of SHIP.SEQ starts (about halfway down the Track Bar). Voila! Your first scene is completed.

Now you need to see the alien ship firing its lasers; load the Demo we were working on earlier, by selecting Load Block from the Block Menu and choosing ALIENZAP.AVS (or whatever you called it). Then paste it into the first open track by selecting Paste from the Block Menu (or by pressing the + key) and left-clicking in the Track Bar area of the next open track. Check how it fits with your earlier scene by pressing P for Play Once.

A quick cut back to the wobble ship followed by a few explosions should tell the tale nicely. Capture the first three tracks (SHIP.SEQ, WHOOSH.SPL and CLANK.SPL) into the Block buffer and then Paste them into the first open track. Once again, check out the overall effect and adjust the track positions and timing where necessary. For example, you may not want to loop the second ship scene twice; once may be enough.

Ah, it's time for some explosions! Just as you did with the other tracks, left-click in the Filename area to load video tracks and right-click in the same area to load sound tracks. A couple of loops of the spinning globe in the silence of space should be good for another few seconds of animation and make a strong contrast to the explosions. Then perhaps make a quick cut to the cackling alien and then cut back to the spinning earth with your alien ultimatum .SPL as a voiceover. If you position the second globe track to begin before the end of the cackling alien scene, AVS will cut to the globe before the alien is quite finished cackling. This technique is called an audio bridge, since it bridges between the scenes.

I leave the conclusion of your space epic--and the mush sound--to you, but I think you'll find the Audio-Video Sequencer to be a flexible editing tool for the job.

How It's Done

I used the sound playback assembly language source code that comes with MichTron's ST Replay as a starting point. It sets a timer to interrupt the processor at the sampling rate. The interrupt routine simply takes the next byte of the sample and uses it as an index into a table to drive the volume registers of the Yamaha sound chip. The 68000 is free to do other tasks when not processing the interrupt.

To keep the interrupt routine as fast as possible I devote half of the 68000 registers to the interrupt and use the other half to play back the animation. With a little massaging of the sound samples and the video updates to get them to take less real-time processing, I've managed to get 30Khz sound playing over 60Hz video. Large video updates are slower, but even in the worst case 20Khz sound over 20Hz video is possible.

The hardest part of this was synchronizing the video to the monitor. The sound shuts off the vertical blank interrupt, but palette changes need to be done during that time. Fortunately the ST has a video beam position register. The code to check this (in LISTEN.ASM) while doing video delta updates is twisted, but it works (though it'd be nice if it processed keyboard events too). There's a "pseudo-vblank" routine that is called whenever the beam position register points off-screen that keeps a clock, updates the palette and decides when to start and stop sound or video tracks. Well, that's about it. Have fun with your talkies! (And we'd like to see--and hear--your best work, so send it in!)

Jim Kent studied mathematics and art at UC Santa Cruz before he joined Island Graphics in 1983. There he worked on a Micro-lllustrator on the Tandy Color Computer and parts of several paint systems including TARGA Tips and Aegis Images. While at Island, he authored Aegis Animator on the Amiga. In 1986 Jim left Island to form Dancing Flame, which has produced Animator ST for Aegis, Flicker for START and Cyber Paint for the Catalog.

Products Mentioned

The Anti-aliaser, $19.95 plus $2 shipping. Tom Hudson, P.O. Box 3374, Shawnee-Mission, KS 66203.

Cyber Paint Ver. 2.0, $79.95. Antic Software, 544 Second St., San Francisco, CA 94107, (415) 957-0886.

DEGAS Elite, $49 95. Electronic Arts, 1820 Gateway drive, San Mateo, CA 94404, (415) 571-7171.

ST Replay Ver 3.0, $99.95. 2 Bits Software, distributed by MichTron, 576 S Telegraph, Pontiac, MI 48053, (313) 334-5700.


(Note Keyboard equivalents are in brackets )

AVS Menu

About AVS--Shows the copyright notice.

Load [L]--Loads a movie from an .AVS file.

Play [P]--Plays a movie once.

Play Loop [Return]--Plays movie forever. To abort, press Escape; the movie will abort at the end of a loop.

Save [S]--Saves movie.

Memory [M]--Displays memory usage and other status information.

Clear All [Clr]--Clears the movie from memory; does not affect a disk file.

Quit--Exits AVS.

Tracks Menu

Play Track [?]--Plays a single track.

Load Cyber [C]--Loads a track with a video (.SEQ) file.

Load Replay [R]--Loads a track with a sound (.SPL) file.

Examine [X]--Goes to the Examine Track screen to set playback speed and looping (repeating) for an individual track. (Click on the Examine Track heading bar to hear/view a track.)

Kill Track [K]--Deletes single track from Edit Decision List.

Block Menu

Capture [*]--Places a block of tracks in a buffer. You define a block of tracks by clicking on the beginning and end tracks of the block.

Cut [-]--Like Capture but deletes block from screen. It remains in the buffer for pasting until you do another Capture or Cut operation.

Paste [+]--Copies block buffer onto tracks on screen. This will overwrite existing tracks.

Insert [Ins]--Inserts empty tracks and adds time in the middle of your movie. Click once to define the start track (by the vertical position of the mouse) and start time (by the horizontal position of the mouse inside the Track Bar). Click again to define the end track and end time. Empty tracks will appear between the two clicks, and all of the tracks after the start time of the insert will moved down on the Edit Decision List and later in time. (If you don t want to insert time make the second click to the left of the first click).

Delete [Del]--Deletes all tracks between two mouse clicks and moves up and earlier everything after the second click. Works the opposite of Insert. This will permanently remove these tracks from your Edit Decision List, but will not affect any disk files.

Free Block [F]--Empties the block buffer and the memory it's using.

Load Block [B]--Loads an .AVS file into the block buffer.

Time Menu

Duration [D]--Lets you view/set the length of a movie.

Pack Video--Rearranges timing of the video tracks so that one starts right after another without any gaps or overlap. This command also adjusts the duration of the movie to fit the total length of the video tracks.

Pack Sound--Does the same thing to sound tracks.

Pack Both--Packs video and sound.

Sort Tracks--Displays all tracks in their StartTime order

Separate Tracks--Separates video and sound tracks and displays all video tracks together first followed by all sound tracks.

Window Menu

Line Down [Down Arrow]--Scrolls the Edit Decision List down one track.

Line Up [Up Arrow]--Scrolls the Edit Decision List up one track.

Page Down [Right Arrow]--Scrolls the Edit Decision List down 14 tracks (one screen).

Page Up [Up Arrow]--Scrolls the Edit Decision List up 14 tracks (one screen).

The Edit Decision List Screen

NAME--Displays filename of video or sound track. Left-click to load with a Cyber Sequence video track or right-click to load an ST Replay sound track.

START--StartTime (beginning) of track in ticks (1/60 second). Lelt-click to move 1 tick earlier and right-click to move 10 ticks earlier.

STOP--StopTime (end) of track. Leftclick for 1 tick later and right-click for 10 ticks later.

TIME POSITION--Time Bars which display the relative positions and lengths of tracks. Press and hold the left mouse button to drag a Track Bar to its position. Right click to go to the Examine Track screen.

(Keyboard shortcut: the spacebar will play whichever track the mouse cursor is over.)