Multimedia Communication Experiment Guide.docx

上传人:b****5 文档编号:6509037 上传时间:2023-01-07 格式:DOCX 页数:21 大小:498.14KB
下载 相关 举报
Multimedia Communication Experiment Guide.docx_第1页
第1页 / 共21页
Multimedia Communication Experiment Guide.docx_第2页
第2页 / 共21页
Multimedia Communication Experiment Guide.docx_第3页
第3页 / 共21页
Multimedia Communication Experiment Guide.docx_第4页
第4页 / 共21页
Multimedia Communication Experiment Guide.docx_第5页
第5页 / 共21页
点击查看更多>>
下载资源
资源描述

Multimedia Communication Experiment Guide.docx

《Multimedia Communication Experiment Guide.docx》由会员分享,可在线阅读,更多相关《Multimedia Communication Experiment Guide.docx(21页珍藏版)》请在冰豆网上搜索。

Multimedia Communication Experiment Guide.docx

MultimediaCommunicationExperimentGuide

EXPERIMENT1AUDIOPROCESSING

(3hours)

1.Aims

◆Tolearntheproceduresofdigitizingsound,suchas:

●Sampling

●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

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 自然科学 > 数学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1