180 likes | 432 Views
AUDIO PROGRAMMING. Paris Smith November 28, 2006 ITCS 4230. Overview. Introduction to Audio Programming Basic Terminology Audio Hardware Sample Playback and Manipulation Streaming Audio ADSR Envelopes 3D Audio. Purpose. Job of the audio programmer… Is the programmer needed?
E N D
AUDIO PROGRAMMING Paris Smith November 28, 2006 ITCS 4230
Overview • Introduction to Audio Programming • Basic Terminology • Audio Hardware • Sample Playback and Manipulation • Streaming Audio • ADSR Envelopes • 3D Audio
Purpose • Job of the audio programmer… • Is the programmer needed? • -Audio Events…
Terms • Sound – compression waves transmitted through a medium, such as air or water…
Amplitude –measurement of a sound wave’s pressure… • Wavelength – the distance between the midpoints of a wave (in a sine wave) • Frequency – the interval between wave cycles… • Hertz (Hz) – the number of cycles that occur in a second… • Pitch – the perception of frequency
Tuning – a musical distribution of frequency over keys… • Octave – a doubling or halving of frequency… • Equal Tempering – a system of tuning which divides the 12 notes between each octave equally, so one is not favored over the other… • In correspondence to the perceived loudness…
Decibel (dB) – is a measure of the ratio between two quantities, used in measurements of the loudness of sound • -Perceived loudness increases LINEARLY as power increases LOGARITHMICALLY • (EXAMPLE): if a sound is twice as loud as another sound, it is
Attenuation • Amplify • The approximate quietest sound a human can hear is 20 micropascal (pascal is equivalent to one newton per square metre)…
Audio Hardware Features • The flow of audio data through a typical audio processing and rendering system: • Permanent storage… • Data may require optional software dsecoding… • Memory buffer… • Sound channel processing… • Hardware mixing of all channels and digital analog signal conversion
Sampling • Measuring and storing the amplitude of a sound wave at discrete time intervals • Sampling Rate – the rate at which the samples are collected, measured in samples per second… • Bit-Depth – size of sampled data
Sample Playback and Manipulation • A digital audio sample is assigned to a channel then processed. • Manipulating the individual data • Sent to a buffer where it is combined into a single audio stream • Converted into a digital signal in waveform for playback
Channel Operations • Panning – directing the relative position of a sound in a stereo field by attenuating the left or right mix • Pitch Control – processing more or fewer samples per second • Volume Control – implemented via an attenuation control measured in decibels
Streaming Audio • The concept of reading data in real time for playback directly off the bulk-storage medium (disk) instead of storing the entire sample in memory • Pre-buffer is necessary
ADSR Envelopes • ADSR: Attack, Decay, Sustain, and Release
3D Audio • The game player must be provided with aural cues to immerse tem more fully into the simulated world • Our ears hear sounds at different times and volumes • Solution