《声音是一种由物体振动引发的物理现象.ppt》由会员分享,可在线阅读,更多相关《声音是一种由物体振动引发的物理现象.ppt(59页珍藏版)》请在三一办公上搜索。
1、Sound is a physical phenomenon produced by the vibration of matter,such as a violin string,or a block of wood.As the matter vibrates,pressure variations are created in the air surrounding it.This alteration of high and low pressure is propagated through the air in a wave-like motion.When a wave reac
2、hes the human ear,a sound is heard.,声音是一种由物体振动引发的物理现象,如小提琴的弦声等。物体的振动使其四周空气的压强产生变化,这种忽强忽弱变化以波的形式向四周传播,当被人耳所接收时,我们就听见了声音。,Sound/Audio,声音和音频技术涉及的主要是声波(声学信号)的处理。编码、录音机或数字音频带的存储、音乐及语音处理是这一领域的主要课题。Sound methodology and audio techniques engage in processing these sound waves(acoustic signals).Important top
3、ics in this area are coding,storage on recorders or digital audio tapes,music and speed processing.,声音是由物体的振动产生的,这种振动引起了周围空气压强的振荡,我们称这种振荡的函数表现形式为波形.Sound is produced by the vibration of matter.During the vibration,pressure variations are created in the air surrounding it.The pattern of the oscillati
4、on is called a waveform,Basic sound Concepts,Figure 3.1:Oscillation of an air pressure wave.,Amplitude,Time,Air Pressure,One Period,+,如果每隔一定时间波形就重复相同的形状,那么就称这个时间为周期。一般然声音的波形既不会十分光滑也不会有很强的周期性。与非周期性的声音相比,具有周期性的声音听起来要悦耳得多。乐器的演奏、元音、鸟鸣及风声都是周期性的声音,而打击乐器声、咳嗽声、喷嚏声以及流水声则是非周期性的。The waveform repeats the same s
5、hape at regular intervals and this portion is called a period.Since sound waves occur naturally,they are never perfectly smooth or uniformly periodic.However,sounds that display a recognizable periodicity tend to be more musical than those that are nonperiodic.Examples of periodic sound sources are
6、musical instruments,vowel sounds,the whistling wind and bird songs.Nonperiodic sound sources include unpitched percussion instruments,coughs and sneezes and rushing water.,声音的频率是周期的倒数,它表示的是声音在1秒钟内的周期数,单位是赫兹(Hz)。千赫(kHz),即1000Hz,表示每秒振动1000次Boo87。声音按频率可作如下划分:The frequency of a sound is the reciprocal v
7、alue of the period;it represents the number periods in a second and is measured in hertz(Hz)or cycles per second(cps).A convenient abbreviation,kHz(kilohertz),is used to indicate thousands of oscillation per second:1 kHz equals 1000 Hz Boo87.The frequency range is divided into:,Frequency,次声 020Hz 人耳
8、能听见的声音 20Hz20KHz 超声 20KHz1GHz 特超声 1GHz10THz Infra-sound from 0 to 20 Hz Human hearing frequency range from 20Hz to 20kHzUltrasound from 20kHz to 1GHzHypersound from 1GHz to 10 THz,多媒体系统中使用的声音一般只限于人耳能听到的范围,我们把人耳所能听见的声音为音频(audio),将这个范围内的声波称为声学信号(acoustic signal)。例如语音是由人发出的声学信号,乐器的频率范围在20Hz之间。我们将语音和音乐之
9、外的音频信号统称为噪音。Multimedia systems typically make use of sound only within the frequency range of human hearing.We will call sound within the human hearing range audio and the waves in this frequency range acoustic signals Boo87.For example,speech is an acoustic signal produced by humans;music signals h
10、ave a frequency range between 20Hz and 20khz.Besides speech and music,we denote any other audio signal as noise.,声音有振幅,振幅的主观感觉是声音的大小。声音的振幅大小取决于空气压力波距平均值(也称平衡态)的最大偏移量。A sound also has an amplitude,a property subjectively heard as loudness.The amplitude of a sound is the measure of the displacement of
11、 the air pressure wave from its mean,or quiescent state.,Amplitude,计算机并不直接使用连续平滑的波形来表示声音,它是每隔固定的时间对波形的幅值进行采样,用得到的一系列数字量来表示声音。图3.2是经过数字采样的波形示意图。The smooth,continuous curve of a sound waveform is not directly represented in a computer.A computer measures the amplitude of the waveform at regular time i
12、nterval to produce a series of numbers.Each of these measurements is a sample.Figure 3.2 illustrates one period of a digitally sampled waveform.,Computer Representation of Sound,Time,Sample,Sample height,+,0,Figure 3.2:Sampled waveform.,使用模-数转换器(ADC)可以将音频信号转换成数字采样值,使用数-模转换器(DAC)则可以将数字信号转换为模拟信号。AM79C
13、30A芯片是一种ADC,SPARC工作站将其用于音频输入,而对于音频输出,桌面SPARC系统使用的是内置的扬声器。DAC也是一个标准的UNIX设备,例如SPARC服务器6xx系统没有自带的扬声器但支持外接的话筒和扬声器。The Mechanism that converts and audio signal into digital samples is the Analog-to-Digital Converter(ADC).The reverse conversion is performed by a Digital-to-Analog Converter(DAC).The AM79C3
14、0A Digital Subscriber Controller chip is an example of an ADC and is available on SPARCstationsTM.Desktop SPARCTMsystems include a built-in speaker for audio output.DAC is also available as a standard UNIXTMdevice.For example,SPARCserver 6xx systems do not have an internal speaker,but support an ext
15、ernal microphone and speaker.,采样频率表征的是单位时间内对波形采样44100次,这似乎超出了人耳所能听见声音的频率范围。但根据Nyguist采样定律,要从采样中完全恢复原始信号波形,采样频率必须至少是信号中最高频率的两倍,所以CD标准采样频率至少要是人耳所能听到频率上限20KHz的两倍,这样44100的采样率所能表示的频率上限为22050Hz。The rate at which a continuous waveform(Figure 3.1)is sampled is called the sampling rate.Like frequencies,sampl
16、ing rates are measured in Hz.The CD standard sampling rate of 44100 Hz means that the waveform is sampled 44100 times per second.This seems to be above the frequency range the human ear can hear.However,the bandwidth(which in this case is 20000 Hz-20Hz=19980Hz)that digitally sampled audio signal can
17、 represent,is at most equal to half of the CD standard sampling rate(44100Hz).This is an application of the Nyquist Sampling theorem.(“For lossless digitization,the sampling rate should be at least twice the maximum frequency responses.”)Hence,a sampling rate of 44100Hz can only represent frequencie
18、s up to 22050Hz,a boundary much closer to that of human hearing.,Sampling Rate,采样是在离散的时间点上进行的,而采样值本身在计算机中也是离散的。采样值的精度取决于它用多少位来表示,这就是量化。例如8位量化可以表示256个不同值,而CD质量的16位量化可以表示65 536个值。图3.3是一个3位量化的示意图,可以看出3位量化只能表示8个值:0.75,0.5,0.25,0,0.25,0.5,0.75和1,因而量化位数越少,波形就越难辨认,还原后的声音质量也就越差(可能除了一片嗡嗡声之外什么都没有)Just as a wa
19、veform is sampled at discrete times,the value of the sample is also discrete.The resolution or quantization of a sample value depends on the number of bits used in measuring the height of the waveform.An 8-bit quantization yields 256 possible values;16-bit CD-quality quantization results in over 655
20、36 values.Figure 3.3 presents a 3-bit quantization.The sampled waveform with a 3-bit quantization results in only eight possible values:.75,.5,.25,0,-.25,-.5,-.75 and 1.The shape of the waveform becomes less discernible with a lowered quantization,i.e.,the lower the quantization,the lower the qualit
21、y of the sound(the result might be a buzzing sound).,Quantization,Sample,0,.25,.5,.75,-.25,-.5,-.75,Sample Height,Figure 3.3:Three-bit quantization.,计算机必须有相应的输入输出设备才能进行声音信号的处理。话筒与内置扬声器分别是与ADC和DAC相连的音频输入与输出设备。Before sound can be processed,a computer needs input/output devices.Microphone jacks and bui
22、lt-in speakers are devices connected to an ADC and DAC,respectively for the input and output of audio.,Sound Hardware,音频的两个重要格式参数是采样频率(如每秒8012.8次)和采样量化位数(如8位量化)。The above examples of telephone-quality and CD-quality audio indicate that important format parameters for specification of audio are:sampl
23、ing rate(e.g.,8012.8 samples/second)and sample quantization(e.g.,8-bit quantization).,Audio Formats,A MIDI interface has two different components:3.2.1 MIDI的基本概念 MIDI接口由两个不同的部分组成:,MusicMIDI Basic Concepts,一是与设备相连的硬件标准,它规定了乐器间的物理连接方式,要求乐器必须带有MIDI端口,它还对连接两个乐器的MIDI缆线和缆线上传输的电信号作了规定。Hardware connects the
24、 equipment.It specifies the physical connection between musical instruments,stipulates that a MIDI port is built into an instrument,specifies a Midi cable(which connects two instruments)and deals with electronic signals that are sent over the cable.,二是数据格式标准,它给出了硬件上传输的信息的编码方式。与音频数据格式(3.1.2节)不同,MIDI数
25、据格式不处理单个采样点的编码,它包括乐器的定义、音符的开始与结束、基本频率及音量等描述。MIDI数据可以编码10个8度音程,也就是128个音符。A date format encodes the information traveling through the hardware.A MIDI data format does not include an encoding of individual samples as the audio format does(Section 3.1.2).Instead of individual samples,an instrument conne
26、cted data format is used.The encoding includes,besides the instrument specification,the notion of the beginning and end of a note,basic frequency and sound volume.MIDI data allow an encoding of about 10 octaves,which corresponds to 128 notes.,MIDI使用数字方式描述数据,数据被分成多组MIDI消息,一组MIDI消息代表一个音乐事件,这些音乐事件通常是演奏
27、动作,比如击键、移动滑动条、设置开关及调整脚踏板等.The MIDI message communicates one musical event between machines.These musical events are usually actions that a musician performs while playing a musical instrument.The action might be pressing keys,moving slider controls,setting switches and adjusting foot pedals.,比如弹奏钢琴,
28、击键时由MIDI接口产生一个MIDI消息,这个消息包含音符的开始及击键的强度等,它被传到另一台机器上,而当松开键时又产生一个相应的MIDI消息。10分钟的音乐,用MIDI来表示,只需200KB的MIDI数据,比CD质量音频编码少得多。When a musician presses a piano key,the MIDI interface creates a MIDI message where the beginning of the note with its stroke intensity is encoded.This message is transmitted to anoth
29、er machine.In the moment the key is released,a corresponding signal(MIDI message)is transmitted again.For ten minutes of music,this process creates about 200 Kbytes of MIDI data,which is essentially less than the equivalent volume of a CD-audio coded stream in the same time.,如果数字乐器满足了上述MIDI标准的两项要求,就
30、称之为MIDI设备(例如合成器),它就能通过MIDI通道与其他MIDI设备交换信息。MIDI标准规定可用16个通道来传输数据,每个通道对应一个MIDI设备(乐器)。由通道传输的音乐数据被接收端的合成器重新合成为音乐。MIDI还规定了128种乐器效果,其中包括噪音效果(如电话、飞机等),每种乐器效果与一个惟一的数字相对应,例如0代表钢琴,12代表马林巴(marinba,一种乐器),40代表小提琴,73代表长笛等。If a musical instrument satisfies both components of the MIDI standard,the instrument is a MI
31、DI device(e.g.,a synthesizer),capable of communicating with other MIDI devices through channels.The MIDI standard specifies 16 channels.A MIDI device(musical instrument)is mapped to a channel.Music data,transmitted through a channel,are reproduced at the receiver side with the synthesizer instrument
32、.The MIDI standard identifies 18 instruments,including noise effects(e.g.,telephone,air craft),with unique numbers.For example,0 is for the Acoustic Grand Piano,12 for the marimba,40 for the violin,73 for the flute,etc.,有些乐器一次只能演奏一具音符,如长笛,而有些乐器则可以同时演奏多个音符,如风琴。某个通道的合成器每次可演奏的最多音符个数是合成器的一个主要参数。该参数一般在31
33、6之间。Some instruments allow only one note to be played at a time,such as the flute.Other instruments allow more than one note to be played simultaneously,such as the organ.The maximum number of simultaneously played notes per channel is a main property of each synthesizer.The range can be from 3 to 1
34、6 notes per channel.,要想将MIDI设备映射到通道上,必须设定设备的MIDI接收模式,共有4种接收模式:To tune a MIDI device to one or more channels,the device must be set to one of the MIDI reception modes.There are four modes:,模式1 Omni On/Poly(所有 开/复音)模式2 Omni On/Mono(所有 开/单音)模式3 Omni Off/Poly(所有 关/复音)模式4 Omni Off/Mono(所有 关/单音)Mode 1:Omn
35、i On/Poly;Mode 2:Omni On/Mono;Mode 3:Omni Off/Poly;Mode 4:Omni Off/Mono,通过MIDI接口,计算机可以控制各个乐器的输出,同时,通过这个接口,计算机还能接收、存储并处理经过编码的音乐数据。数据由键盘产生,可通过声音生成器还原为声音,用音序器存储数据,大多数情况下它还有编辑音乐数据的功能。在多媒体系统中,音序器是一个应用程序。Through the MIDI interface,a computer can control output of individual instruments,On the other hand,t
36、he computer can receive,store or process coded musical data through the same interface.The data are generated with a keyboard and reproduced through a sound generator.A sequencer can store data.Further,it may also modify the musical data.In a multimedia system,the sequencer is a computer application
37、.,MIDI Devices,合成器是所有MIDI系统的核心。从外观上看合成器就像一个带有许多按钮的简单的钢琴键盘,但它决非如此简单。大部分合成器包括以下几个组成部分:The heart of any MIDI system is the MIDI synthesizer device.A typical synthesizer looks like a simple piano keyboard with a panel full of buttons,but it is far more(more detailed information on synthesizers can be fo
38、und in Boo87.).Most synthesizers have the following common components:,声音生成器微处理器键盘控制面板辅助控制器存储器Sound GeneratorsMicroprocessorKeyboardControl PanelAuxiliary Controllers Memory,音序器是一个重要的MIDI设备,可以是击鼓机、计算机或专门设计的音序器。一开始音序器用来存储MIDI数据的、现在如果计算机充当音序器,还可以对音乐进行编辑。由于数据是以数字形式表示的,所以很容易修改。音乐数据的表示方式有好几种,最常见的形式是用音符,这
39、样音乐在计算机中以乐谱的形式出现,然后由音序器将乐谱中的音符转换为MIDI消息(见3.2.1和3.2.3节)。音乐数据的另一种表示形式是直接使用MIDI消息,但这要求用户研究每个通道需要的音乐事件类型及相应的时间依赖关系,而且MIDI消息的输入依赖于键盘的类型。An important MIDI device is a sequencer,which can be a drum machine,computer or dedicated sequencer.A sequencer was used originally as a storage server for generated MID
40、I data.Today,a sequencer,being a computer,becomes additionally a music editor.Data can be modified in a proper way because of their digital data representation.There are several possibilities to represent musical data.The most common representation and manipulation of data are musical notes.The musi
41、cal piece appears on the screen in the form of a sheet of music.The sequencer transforms the notes into MIDI messages(Sections 3.2.1,3.2.3).Another representation is a direct input of MIDI messages.Here,the user specifies required musical events per channel with their time dependencies.This input de
42、pends on the keyboard type.,MIDI消息所传送的既可以是数据信息也可以是确定音乐事件类型的控制信息。MIDI消息的格式包括状态字节和数据字节。状态字节总是MIDI消息的第一个字节,用来描述消息的类型,数据字节则是其余的部分。MIDI消息可分为两大类:MIDI messages transmit information between MIDI devices and determine what kinds of musical events can be passed from device to device.The format of MIDI message
43、s consists of the status byte(the first byte of any MIDI message),which describes the kind of message,and data bytes(the following bytes).MIDI messages are divided into two different types:,MIDI Messages,通道消息只发向指定的设备,一般分为两种类型:Channel messages go only to specified devices.There are two types of chann
44、el message:,Channel Messages,通道声音消息。它在MIDI设备间传送演奏的数据,包括键盘动作、控制动作及控制面板的变化。它用音调、振幅、音色及其他一些性质来描述音乐。在通道声音消息中,状态字节后至少有1个字节(通常2个字节)来描述声音的性质。诸如Note On,Note Off,Channel Pressure,Control Change等都属于通道声音消息。-Channel voice messages send actual performance data between MIDI devices,describing keyboard action,cont
45、roller action and control panel changes.They describe music by defining pitch,amplitude,timbre,duration and other sound qualities.Each message has at least one and usually two data bytes that accompany the status byte to describe these sound qualities.Examples of channel voice messages are Note On,N
46、ote Off,Channel Pressure,Control Change,etc.,通道模式消息。用于确定MIDI接收设备对通道声音消息做出反应的方式,它可以设定MIDI设备的MIDI通道接收模式,可以中止错误音符的演奏,还可以影响对设备的局部控制。诸如Local Control,All Notes Off,Omni Mode Off等都是通道模式信息。-Channel mode messages determine the way that a receiving MIDI device responds to channel voice messages.They set the M
47、IDI channel receiving modes for different MIDI devices,stop spurious notes from playing and affect local control of a device.Examples of such messages are Local Control,All Notes Off,Omni Off,etc.,因为没有指定通道号,所以系统消息发向MIDI系统中的所有设备。系统消息共分为三类:System messages go to all devices in a MIDI system because no
48、channel numbers are specified.There are three types of system messages:,System Messages,实时系统消息。这是一个只有1字节的简短消息,它能携带特殊的数据。这些消息使MIDI设备在演奏中保持同步,因此一旦需要类信息就应立即发送。为了避免延尺,如果需要,这些消息可以夹在其他消息的中间发送。System Reset,Timing Clock(MIDI时钟)等都是这类消息。-system real-time messages are very short and simple,consisting of only o
49、ne byte.They carry extra data with them.These messages synchronize the timing of MIDI devices in performance;therefore,it is important that they be sent at precisely the time they are required.To avoid delays,these messages are sent in the middle of other messages,if necessary.Examples of such messa
50、ges are System Reset,Timing Clock(MIDI clock),etc,一般系统消息。一般系统消息可以使音序器和合成器做好演奏准备。这些消息可以选择乐曲确定演奏起点,如果需要,还可以对合成器调音。Song Select,Tune Request 都是一般系统消息。-system common messages are commands that prepare sequencers and synthesizers to play a song.The various messages enable you to select a song,find a commo