Sound on the Web
Using Sound on a Web Site Conveying information pronounce a word or describe a product Set a mood music to match the web page scene Capture attention – a sound effect Explain a process Provide personal contact – voice, laugh
Physics of Sound – cycles per second – Hertz (Hz) or KHz
Sampled Sound Sound wave is digitized by sampling at twice the highest frequency Converted to a number representing the volume (amplitude) Stored in a computer file Can represent any sound called a wave file – usually a file extension.wav Often compressed to reduce file size
Sampled Sound
Musical Instrument Digital Interface (MIDI) Not sampled – includes a code representing -- Musical note Loudness Length of time Type of instrument Not compressed Generated by a synthesizer File extension.mid
Characteristics of sampled, compressed and Midi files Sampled files are very large depending on the highest frequency being recorded and length of recording. voice – less than 8 kHz – sample 16kHz symphony orchestra – 22 kHz – sample 44 Hz, Mono Compressed sound is sampled sound processed to make the file smaller without sacrificing sound quality Midi are much smaller files but can represent only music
Streaming Sound Played by user computer as it is received – not downloaded saves bandwidth does not require storage space on user computer live event sounds prevent copying file
Sound File Formats Link
Preparing Sound for the Web – Create a File Use pre-recorded sound Record from microphone Use “text-to-sound” synthesizer Edit – mix sounds, cut, cut-and-paste, add effects (Audacity) Record musical instrument sounds from synthesizer (cannot be edited in computer)
Download a Sound File Google – free sound download– Sometimes the file may be a Zip file compressed combine several files in one Zip files are shown as a folder with a zipper on it. It can be automatically “unzipped” by double clicking on the folder and selecting “extract” all files.
Text To Speech Conversion s/demo.php (note different voices) s/demo.php Audacity has a built-in converter
Including Sound on Web Page (Same procedure as with a movie) Passive – plays automatically Active – requires user action Embedded – Media -> Plugin Linked – hyperlink to audio file – sound file opens in separate window
Autoplay True, False Controller True, False Loop True, False
Audacity – sound utility