Multimedia Communication Experiment GuideWord文件下载.docx
- 文档编号:19522805
- 上传时间:2023-01-07
- 格式:DOCX
- 页数:21
- 大小:498.14KB
Multimedia Communication Experiment GuideWord文件下载.docx
《Multimedia Communication Experiment GuideWord文件下载.docx》由会员分享,可在线阅读,更多相关《Multimedia Communication Experiment GuideWord文件下载.docx(21页珍藏版)》请在冰豆网上搜索。
●Quantization
●Encoding
◆Tolearnthesignificanceofsamplingandquantizationfortheaudioquality.
◆Tolearnhowtoeditandanalyzeaudio.
2.BasicTheory
2.1SoundFundamentals
Soundisaphysicalphenomenonproducedbythevibrationofmatter.Vibrationofmatterinducestheoscillationoftheairpressurearoundthematter.Then,thepressurevariationpropagatesinawave-likemotion,andwhenitarrivesatourear,wehearthesound.Withoutairthereisnosound,forexample,inspace.Sincesoundisapressurewave,ittakesoncontinuousvalues,asopposedtodigitizedoneswithafiniterange.Nevertheless,ifwewishtouseadigitalversionofsoundwaves,wemustformdigitizedrepresentationsofaudioinformation.
Thetwomostimportantparametersusedtocharacterizethesoundwaveformarefrequencyandamplitude.Frequencyisthereciprocalofperiodandrepresentsthenumberofperiodwithinonesecond.TheunitoffrequencyisHz.Thefrequencyrangeofspeechisfrom300Hzto3400Hz.Ontheotherhand,amplituderepresentstheloudnessofsound.
2.2DigitizationofSound
Asweknow,soundiscontinuousanalogsignal,andcannotbeprocessedbycomputerdirectly.Incomputer,soundisrepresentedbyaseriesofdigitalnumber.Wecalltheprocedureofconvertingtheanalogsoundwaveformintodiscretedigitalnumberasdigitizationofsound.Forthesakeofefficiency,thesedigitalnumbersshouldbeintegers.
Tofullydigitize,theanalogsoundsignalmustbesampledinbothtimedimensionandamplitudedimension,whichisreferredtoassamplingandquantizationrespectively,asdepictedinFig.1.Furthermore,filteringandencodingarealsoimportanttodigitizationofsound.Priortosampling,theanalogsoundsignalshouldbefilteredtoremovetheunwantedfrequencybyusingabandpassfilter.Afterquantization,encodingisperformedtoassignacodewordtoeachoutputlevelorsymbolofquantization,andabinarybitstreamisgenerated.Insummary,analogtodigitalconversion(ADC)systemcanbeillustratedbyFig.2asfollows.
Fig.1SamplingandQuantization
(a)Samplingtheanalogsignalinthetimedimension.
(b)Quantizationissamplingtheanalogsignalintheamplitudedimension.
Fig.2AnalogtoDigitalConversion(ADC)
2.2.1Sampling
Samplingmeansmeasuringtheamplitudeofthesoundwaveformatevenlyspacedtimeintervalstoproduceaseriesofvalues,andtherateatwhichitperformediscalledthesamplingfrequency.Foraudio,typicalsamplingratesarefrom8kHz(8000samplespersecond)to48kHz.Thehumanearcanhearfromabout20Hztoasmuchas20kHz;
abovethislevel,weentertherangeofultrasound.Thehumanvoicecanreachapproximately4kHzandweneedtoboundoursamplingratefrombelowbyatleastdoublethisfrequency.Thuswearriveattheusefulrangeabout8to40orsokHz.
Inordertorecoverthesignalcorrectly,wemustuseasamplingrateequaltoatleasttwicethemaximumfrequencycontentinthesignal.ThisiscalledtheNyquistrate.TheNyquistTheoremisnamedafterHarryNyquist,afamousmathematicianwhoworkedatBellLabs.Moregenerally,ifasignalisband-limited—thatis,ifithasalowerlimitf1andanupperlimitf2offrequencycomponentsinthesignal,thenweneedasamplingrateofatleast2(f2-f1).Thehigherthesamplingfrequencyis,thebettertheaudioqualityis,andthelargerstoragevolumeis.Typicalsamplingrateiseither44.1kHz,equivalenttoaboutCDquality,or8kHz,fortelephonequality.
2.2.1Quantization
Samplingintheamplitudeorvoltagedimensioniscalledquantization,anditincludesuniformquantizationandnon-uniformquantization.Typicaluniformquantizationratesare8-bitand16-bit;
8-bitquantizationdividestheverticalaxisinto256levels,and16-bitdividesitinto65536levels.
Fordigitalsignals,onlyquantizedvaluesarestored.Foradigitalaudiosignal,theprecisionofeachsampleisdeterminedbythenumberofbitspersample.Asidefromanynoisethatmayhavebeenpresentintheoriginalanalogsignal,additionalerrorresultsfromquantization.Thatis,ifvoltagesareintherangeof0to1butwehaveonly8bitsinwhichtostorevalues,weeffectivelyforceallcontinuousvaluesofvoltageintoonly256differentvalues.Inevitably,thisintroducesaround-offerror.Althoughitisnotreally“noise”,itiscalledquantizationnoise,orquantizationerror.
Thequalityofthequantizationischaracterizedbythesignal-to-quantization-noiseratio(SINR).Quantizationnoiseisdefinedasdifferencebetweenthevalueoftheanalogsignal,fortheparticularsamplingtime,andthenearestquantizationintervalvalue.Atmost,thiserrorcanbeasmuchashalfoftheinterval.
ForaquantizationaccuracyofNbitspersample,therangeofthedigitalsignalis-2N-1to2N-1-1.Thus,iftheactualanalogsignalisintherangeform-Vmaxto+Vmax,eachquantizationlevelrepresentsavoltageof2Vmax/2N,orVmax/2N-1.SQNRcanbesimplyexpressedintermsofthepeaksignal,whichismappedtothelevelVsignalofabout2N-1,andtheSQNRhasasdenominatorthemaximumVquan_noiseof1/2.TheratioofthetwoisasimpledefinitionoftheSQNR:
Ontheotherhand,ifweassumethattheinputsignalissinusoidal,thatquantizationerrorisstatisticallyindependent,andthatitsmagnitudeisuniformlydistributedbetween0andhalftheinterval,wecanshowthattheexpressionfortheSQNRbecomes
Sincelargerisbetter,thisshowsthatamorerealisticapproximationgivesabettercharacterizationnumberforthequalityofasystem.
Typicaldigitalaudiosampleprecisioniseither8bitspersample,equivalenttoabouttelephonequality,or16bits,forCDquality.Infact,12bitsorsowouldlikelydofineforadequatesoundreproduction.
2.2.2Encoding
Encodingmeansassigningacodewordtoeachoutputlevelorsymbolofquantization.Thiscouldbeafixed-lengthcodeoravariable-lengthcode,suchasHuffmancoding.Ingeneral,producingquantizedsampledoutputforaudioiscalledPulseCodeModulation,orPCM.ThedifferencesversioniscalledDPCM,andtheadaptiveversioniscalledADPCM.
InPCM,atthesender,aband-limitingfilterisusedtoremovethehighandverylowfrequencycontentfromtheanaloginputsignalfirstly,andthenperformanalog-to-digitalconversion,thusproducethePCMsignals,asillustratedinFig.3(a).Atthereceiver,performdigital-to-analogconversionandthenconstructanoutputanalogsignalwhichisstaircaseshowninFig.3(b).Thistypeofdiscontinuoussignalcontainsnotjustfrequencycomponentsduetotheoriginalsignalbut,becauseofthesharpcorners,alsoatheoreticallyinfinitesetofhigher-frequencycomponents.Therefore,theoutputofthedigital-to-analogconverterisinturnpassedtoalow-passfilter,thustheoutputbecomingsmoothed,asFig.3(c)shows.
Fig.3PulseCodeModulation(PCM)
(a)OriginalanalogsignalanditscorrespondingPCMsignals.(b)Decodedstaircasesignal.
(c)Reconstructedsignalafterlow-passfiltering
Generally,ifatime-dependentsignalhassomeconsistencyovertime(temporalredundancy),thedifferencesignal—subtractingthecurrentsamplefromthepreviousone—willhaveamorepeakedhistogram,withamaximumaroundzero.Consequently,ifwethengoontoassignbit-stringcode-wordstodifferences,wecanassignshortcodestoprevalentvaluesandlongcode-wordstorarelyoccurringones.Predictivecodingsimplymeanstransmittingdifferences.Wepredictthenextsampleasbeingequaltothecurrentsampleandsendnotthesampleitselfbuttheerrorinvolvedinmakingthisassumption.DPCMisexactlythesameaspredictivecoding,exceptthatitincorporatesaquantizerstep.Furthermore,adaptiveDPCMtakestheideaofadaptingthecodertosuittheinputmuchfurther.ADPCMcanadaptivelymodifythequantizer,bychangingthestepsizeaswellasdecisionboundariesinanon-uniformquantizer.
3.Steps
●RecordandEditAudio;
1.Installthesoftwareincomputer(chooseapropertyfolder)andthenclickthe“AudacityPortable.exe”intheinstallfoldertorunthesoftware.
2.Makesurethatthemicrophoneworkswell,andthenclick
torecordasectionofaudiofile.Click
tostoprecording.
3.Click
toplaytheaudio,ifyoucannothearitclear,clickpop-upmenu“Amplify”onthe“Effect”menutoamplifythevoice.
4.NoticethattheaudiogeneratedbyrecordingisMono,pleaserecordtwoormoreaudiofiles.
5.ChoosetwoMonoTracksandmergethemintoaStereoone(Fig.4).OpenanaudiofileandthensplittheStereoTrackintotwoMonoTracks(Fig.5).
Fig.4MaketwoMonoTracksintoaStereoone
Fig.5SplitaStereoTrackintotwoMonoTracks
6.Loadastereoaudioclipandtrytoalignstereotracks,sothatthelefttrackislaterthantherightonewith3seconds.Describethestepsandtheresults.
7.Chooseasectionoftheaudio,andthenClickpop-upmenu“Cut/Copy/Paste…”onthe“Edit”menuor
toeditthefileasyouwish.Press“Ctrl+Z/Ctrl+Y”orclick
toundo/redoyoulastoperation.
8.Clickpop-upmenu“Duplicate”onthemenu“Edit”or“Ctrl+D”tomakeacopyofthechosenfile.Clickpop-upmenuonthe“Effect”menutoaddeffecttothecopyfile.
9.Clicksubmenuofthe“Generate”menutoedityouraudiofile.Youcanaddsomeeffecttothefile.Analyzethedifferencebetweenatleastthreeeffects.
●SamplingandQuantization
1.Clickpop-upmenu“Open”onthe“File”menutoopenaStereo/MonoTrack,alsoyoucanoperateonyourownfile.
2.Clickpop-upmenu“Duplicate”onthe“Edit”menuor
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Multimedia Communication Experiment Guide
链接地址:https://www.bdocx.com/doc/19522805.html