You can use two methods to employ sound:
1. Create sound cast members and place them in the score in special sound channels 1 or 2
2. Use the linked file format to play external sound files (usually controlled by lingo scripts)
Sound cast members and use in score
- Remember they are actually included in the director file - taking up memory space but not easily separated
- For timing you can try to spread them out over number of cells but it is hard to predict exactly under changing conditions. If you want to retrigger the sound you must introduce break in cells.
- Sounds can be set to loop in their info box. (Design the sound to have natural break at loop point.)
- The tempo channel can be used to cause playback head to wait till sounds stop (not advised because can mess up other script elements)
Lingo for controlling sounds
soundplayFile channel#,name(path) soundplayFile
(Plays a file in any channel. Include whole path if sound not in same folder with Director movie. Sound is separate file; make sure to move it with movie.)
set the soundlevel to ( 0 to 7) (Sets the global volume on machine)
set the volume of sound channel# to (0 to 255)
(controls just the volume of single sound)
sound close channel# (closes a sound file and stops it)
sound fadeIn channel#, ticks sound
fadeOut channel#, ticks
(fades a sound in a particular channel in or out for specified ticks -60ths of second)
set the soundEnabled to (true or false) (controls whether any sounds will play)
soundstop channel# (stops a sound)
the soundBusy (channel#)
(returns true if sound still playing - can be used to loop sounds, control progress)
puppetSound "name or cast#" (overrides sounds
in channel 1. use updateStage to see effects) use puppetSound 0 to
return control to score
Example of looping sound and advancing only when done
-- only advances when sound is done
if soundBusy(3) = true then
go frame "section2"
go to the frame
-- loops a sound
if soundBusy(3) = false then
soundplay 3, "test.aiff"
go to the frame
Example of Lingo Frame Advance Controlled by Sound Finishing.
It advances to the next section only after it is finished.. It assumes external sound files placed in the same file as the movie. It also provides a mini-review of sound formats.
Example of Roll-over sound.
The sounds play only when the viewer rolls the mouse over the visual sprites.
Stephen Wilson, Professor Conceptual/Information Arts/ SFSU
More information about Conceptual Information Arts (CIA) Program (http://userwww.sfsu.edu/~infoarts/)