Presentation is loading. Please wait.

Presentation is loading. Please wait.

1. استاد مربوطه : مهندس آشنا محمودی گرد آورندگان : حدیث السادات آیقی مریم شاهونه.

Similar presentations


Presentation on theme: "1. استاد مربوطه : مهندس آشنا محمودی گرد آورندگان : حدیث السادات آیقی مریم شاهونه."— Presentation transcript:

1 1

2 استاد مربوطه : مهندس آشنا محمودی گرد آورندگان : حدیث السادات آیقی مریم شاهونه

3  Graphicd have become an integral part of our lives. Pictures, photograohs, and mixtures of the two are everywhere. Graphics can be called 'good' or 'bad' depending on a number of things.Here are some of the things you can do to find out these differences for yourself:  مقدمه هنرهای گرافیک  گرافیک جزئی لاینفک از زندگیمان شده است. تصاویر، عکس ها و آمیزه ای از هر دو همه جا وجود دارند. هنرهای گرافیک می توانند با توجه به تعدادی موارد خوب یا بد خوانده شوند. اینجا تعدادی از مواردی را که شما می توانید انجام بدهید تا این تفاوتها را برای خودتان بیابید وجود دارند :  Compare pictures in newspapers, magazines, TV, and movies.  Look at a photograph and try to draw it.  Looak at a real object ( for example, a cup of tea ) and draw it.  Make a collage by cutting out pictures from magazines and new spapers.  مقایسه عکس های موجود در روزنامه ها، مجلات ، تلویزیون و فیلمها را مورد مقایسه قرار دهید.  به یک عکس نگاه کنید و سعی کنید آنرا بکشید.  به یک شئ واقعی نگاه کنید ( برای مثال یک فنجان چای ) و آن را بکشید.  با بریدن تصاویر موجود در مجلات و روزنامه ها یک دانشکده بسازید.

4 Table 1 will help you think about graphics. Table 1 Graphics in various Media  Where do you find pictures with more Detail?  Were do pictures look more real?  Where do things look 'solid'?  Where kind of picture makes you 'feel' something? جدول 1 به شما کمک می کند که درباره گرافیک بیندیشید. جدول 1 گرافیک در رسانه ها ی گوناگون :  تصاویر با جزئیات بیشتر را کجا پیدا می کنید؟  کجا تصاویر واقعی ترند؟  چیزهایی مثل مکعب را کجا می بینید؟  کجا انواع تصاویر احساس شما را می سازند؟

5 WAVEFORM AUDIO IS RECOGNIZED AS ONE OF THE ESSENTIAL COMPONENTS A MULTIMEDIA SYSTEM. With waveform audio, you can do anything within the practical limitations of memory, disk capacity, sound card capabilities, and so on. The normal function that you perform on like cd audio, waveform audio is a digital medium. However, unlike CD audio, it supports a variety of formats, form 8-bit mono at a sample rate of 11 Kps to 16-bit stereo at sample rate of 44 Kbps. Also, unlike CD audio, you can read and write it, store and retrieve it, and manipulate it as you like. فرمت فایل wav شکل موج صوتی به عنوان یکی از عناصر ضروری یک سیستم چند رسانه ای می توان شناخته شده است. با شکل موج صوتی شما می توانید هر چیزی را درون محدودیتهای عملی حافظه،ظرفیت دیسک،قابلیتهای کارن صوتی و... انجام دهید.تابع معمولی که شما روی سی دی صوتی اجرا می کنید شکل موج صوتی یک رسانه دیجیتال است.با این وجود برخلاف سی دی صوتی مجمعه ای از فرمتها را پشتیبانی می کند.مثل cd صوتی ، اگر چه مثل cd نیست ، اما تنوع در شکل و اندازه دارد از 8-bit برای نمونه در اندازه 16bit-11kbps استریو و برای نمونه در اندازه 44 kbps بنابراین cd صوتی نیست. شما می توانید نوشته های آن را بخوانید و اندوختی آن را دوباره بدست آورید دست کاری را انجام می دهد که شما دوست دارید.

6  Sound consists of pressure waves moving through a medium, such as air. For each wave pulse there is a travelling zone of compressed air trailed by a zone of rarefield air. When represented electronically, compression is represented by a positive voltage and rarefaction is represented by a negative volatage. The voltage level determines the amplitude of the wave. A pure sine wave would be gradually switching from a positive to a negative value The analog waveform store digitally has the Fingure 1. The analog waveform as a set of numbers. Audible frequencies rang from 20-20,000 Hz. پایه های صوت دیجیتال صداها شامل فشارحرکت موجها از طریق یک واسطه مثل گوش تشکیل شده اند. برای هر پالس موج یک محدوده انتقال دهنده هوای فشرده شده وجود دارد که توسط یک بخش هوای رقیق شده کشیده می شود. هنگامیکه به صورت الکترونیکی نمایش داده می شود فشرده سازی توسط سطح ولتاژی که دامنه موج را تعیین می کند نمایش داده میشود.یک موج سینوس مطلق به تدریج از مقدار مثبت به منفی عوض می شود شکل موج انالوگ به صورت دیجیتالی ذخیره می شود که در شکل 1 نشان داده شده است. شکل موج آنالوگ به صورت مجموعه ای از اعداد در می آیدفرکانسهای قابل شنوایی از 20 تا 20000 هرتز می باشند.

7  Therefore, to determine a meaningful digital representation, you need to sample the waveform. Sampling is the process of taking a snapshot of the waveform at regular intervals and reprenting it as a binary any audio number. This process is caaled PCM ( pluse code modulation). To accurately represent any audio signal, we sample at twice the maximum frequency contained in the wave source. This is the reason why CD audio is recorded at 44.1 khz which is twice thre maximum audible frequency of humans. You need not however, always stick to this frequency, you may sample at lower sampling rates. Therefore, to record audio at 11khz, you need to sample 11,000 times pes second. The format of the data stored is very simple. In 8-bit sample, each represents amplitude. If the sample contains two channels of audio. The left channel is recorded in the even – numbered bytes while the right channel is recorded in the odd- numberedbytes.in values over 128 while all negative amplitude values rang from - 32,678 to 32,767 بنابراین برای تعیین کردن یک نمایش دیجیتالی معنا دار می بایست شکل موج را نمونه گیری کنید. نمونه گیری فرایند گرفتن نسخه فوری از شکل موج در مدولاسیون کدی پالسهای منظم است. ما برای درست نشان دادن هر سیگنال صوتی در دو فرکانس ماکسیمم به دست امده در منبع موج نمونه برداری می کنیم. این دلیل این است که چرا cd صوتی بر روی 44,1kh2 ضبط می شوند که دو فرکانس قابل شنیدار ماکسیمم انسان است. بهرحال همیشه لازم نیست که شما به این فرکانس بچسبد ممکن است شما در درجات پایینتر نمونه گیری کنید. بنابراین برای ضبط صدا در 11 کیلوهرتزشما می بایست 11,000 در ثانیه نمونه برداری کنید. فرمت داده های ذخیره شده خیلی ساده است. در نمونه 8-bit هر دامنه نشان داده می شودا. اگرنمونه شامل دو کانال صدا اباشد کانال چپ در شماره بایتها byts ظبط شده است. در مقادیر بالای 128 تا موقعی که همه مقادیردامنه منفی باشند رنج آن بین 32768 تا 32767 است.

8  The wave file not only contains the digital data required to produce sound but also additional information such as the sampling rate, the type of audio data, and other critical data. We can perform tape recorder function like play and pause using the normal MCI. However when it comes to modifying a wave file, we cannot use the MCI function. Hence, we use the MMIO low-level function available in the windows APIfor wich we need to know the actual structure of the wave file. ساختار فایل موج wave فایل موج به تنهایی شامل داده دیجیتال مورد نیاز برای تولید صدا نیست اما اطلاعات اضافی مثل درجه نمونه برداری،نوع داده صوتی دیگر داده های بحرانی باشد.ما می توانیم عملکرد نوار ظبط را مثل به اجرا در آوردن یا متوقف کردن با استفاده از ام سی ای نرمال اجرا کنیم.از اینرو از تابع ام ام آی او قابل دسترس در ویندوز که ما ساختار واقعی فایل فایل ویو را نیاز داریمداریم.

9 Wave data comes in several formats, sampling rates. Channels, and resution. All we need to know is that the information apperars in a format block called the 'resource interchange file format ; or the riff chunk. Figure 2 represent a file,TADA.WAV wich is a standard file packaged with win95. As the figure suggests. RIFF fils have hierarcters RIFF. To read and write RIFF files, the standard data structure called MMCKINFO is used. The structure as defined in visual basic is:  Type MMCKINFO  Ckid as forcc  Cksize as long  Fcctyoe as fourcc  Dwdata offset as long  Dwflags as long  End type داده waveبه چندین tvlj وارد می شوند. میزان نمونه گیری ها کانالها و کیفیت آنها.همه ما به این نیاز داریم که بدانیم که اطلاعات در یک فرمت بسته به نام ریف نمایش داده می شود. شکل 2 فایل TADA – WAV را نشان می دهد که استاندارد با پکیج win95 است RIFF فایلی است که ساختار سلسله مراتبی دارد که بیشتر آن شامل chunk است سطح بالای chunk خود RIFF است برای خواندن و نوشتن فایلهای Riff به داده های استانداردی به نام MMCKINFO ( تکراری از اطلاعات چند رسانه ای ) نیاز دارید ساختار آنها را که در زیر مشخص شده است بررسی کنید کنید: Type تکراری از اطلاعات چند رسانه ای Ckid as fourcc Cksize as long Fcc type as fourcc Dwdata affest as long داده ها Dw flags as long End type آخر تایپ

10 جایی که ساختار fourcc تعریف شده است: ساختار Fourcc Type fourcc Charsas string End type Where Fourcc is a 32-bit code used to idintifu riff chunks, and represented as a sequence of 1 to 4 ascii alphanumeric characters padded on the right with blank characters Ckid represents the idebtification of the churk CKsize specifies the size of the data field of the churnk Fcc Type specifies the size of the data field of the churk Dwdataoffset specifies the form type for ;RIFF; Dsflags specifies flag giving additional information about the chunk fourcc یک کد 32 بیتی استفاده شده برای idintifu riff chunks است در مجموعه 1 تا 4 الفبای عددی اسکی نمایش داده شده است. Cikd روش شناسایی chunkها را نشان می دهد. Cksize مخصوص اندازه فایل داده ها و chunk است Fcc type مخصوص اندازه فایل داده ها و chunk است Dw dataoffset مخصوص شکل نوع برای riff است Dw flags مخصوص اطلاعات اضافی تقسیم شده در باره chunk است

11 To read wave format data the structure is  Type pcmwaveformat  Wf as waveformat  Wbitspersample as integer  End type برای خواندن داده فرمت wave ساختار به صورت زیر است Pcmwaveformat type Wfaswave format Wbits per sample as integer End type

12 Where wbitspersample specifies the nimber4 of bits per sample, and the structure of waveformat is as follows:  Type waveformat  Formattag as integer  Nchannels as integer  Nsamplepersec as long  Nsamplespersec as long  Nblockalign as integer  End type Where  Format tag specifies the format types ( usuley pcm).  Channels specifies the number of channels.() signifies mono and 1 soignifi stereo  Samplespersec specifies the sample rate in sample per second  Avgbytespersec specifies the required averge data transfer rate in bvyet/second.  Blockalign specidfies the block alignment in bytes. ساختار wave format به صورت زیر است نوع شکل موجقالب بندی به عنوان عدد صحیح Nchannel s as integer Nsamples persec as long N block align as integer End rype آخر تایپ اندازه tag با اندازه type معمولا" (dcm) Chanels با برخی از سفثقثخ نمونه های persec با نمونه per دوم Avgbyte میانگین داده ها و انتقال bytes Blokalign با قرار

13 Why should we use mmio functions instead of the conventional read/write function? Well the ansver is sample. Although the structures are the same. They vary in size, which means we cannot read them into or write from them into simple. Fixed-length record buffers. To navigate through the wave file we are going to use the following mmio function. We use these function because we do not need to know the astual size of the chunk. To navigate through the structures, all we have to do is set either the chunk id or the from type. Set a search flag and then call mmiodescend () or mmioascend() the function will search for the next xhunk in line and fill in the structure withe the detail for that particular chunk. A wave file consists of three chunks-the riff chunk, pcmformat chunk and the data chunk.However there is another chunk called the list chunk, PCMformat chunk and the DATA chunk. However, there is another chunk salled the list chunk, which contains DATA chunk. However there is another chunk called the list chunk which contains details such as copyright and description of the data chunk. Usully it is blank, but in some wave files shipped along with windows 95.this structure contains some information.. wave دست یابی به داده چرا ما باید MMIo به جای توابع خواندن و نوشتن قرار دادی استفاده کنیم.خوب جواب نمونه است.اگر چه ساختارها شبیه همند اما در سایز متفاوت هستند که به این معنی است که ما نمی توانیم آنها را در نمونه بخوانیم و بنویسیم. طول ثابت به وسیله بافرها ضبط می شود.برای هدایت کردن فایل wave ما باید از تابع mmio را به کار ببریم. یک فایل موج wave شامل 3 تا تکیه یا c chunk است ( chunkRiff) شکل تکه pcm و data chunk مثل هم هستند اگر که دیگر chunk list chunk نامیده می شود که شامل جزئیات copyright و توصیف داده های chunk است که معمولا" خالی است اما بعضی از فایل های wave به تنهایی شامل windows 95 است این ساختار شامل بعضی از اطلاعات هستند

14 table 2 give the structure of the TDAA.WAV file.The steps for reading a wave file are as follows: Open the wave file using the mmio open function Creat an instance of the structure mmckinfo,for example.mmckinfo parent Set parent.FccType.chars='wave; because the FccType of the RIFF chunk is wave Call the mmioDescend function, passing the structure parent as one of its pareameters and a flag mmio-findriff. جدول 2 ساختار tada wave را به ما می دهد.مراحل خواندن یک فایل wave به صورت زیر است: با استفاده از باز کردن تابع mmio فایل wave را باز کنید یک نمونه ساختار MMCKINFO برای مثال MMCKINFO را ایجاد کنید fcctype chars را برابر با wave قرار دهید زیرا fcctype از نوع riff ،wave است تابع mmioDescend را فرا خوانی کنید سپس این ساختار را بعنوان یکی از پارامترهای MMIOP-FINDRIFF به کار ببرید.

15 The parent structure will now be field withe the riff chunk data which means that when you actually print out the values of parent.chik you will find that it contain 'RIFF' and the value of parent.  Create another instance of the structure MMCKINFO, say MMCKINFO Child.  Set the child.chik.chars='fmt' and call mmiodescend function.passing the structure child as one of its parameters and flag MMIO_FINDCHUNK. This will take the file pointer to the beginning of th format chunk.  Call the mmioread function.passing an instance of the structure PCMWAVEFROMAT to it along withe the parameter chikd.cksize that will tell the function how many bytes to read.  Next to reach the data chunk, use the mmiodescend function however before doing that second out of the format chunk.therefore call the mmioascend function passing structure child to it. This will position the pointer to the beginning of the format chunk. این ساختار داده RIFF و CHUNK ا ست و به این معنی است که هنگامی که یک پرینت چاپی از مقادیر می گیریدمی توانید بفهمید که آن شامل RIFF و مقدار parent است.. ساخت نمونه ای دیگر از ساختارهای MMCKINFO بیان می کند که MMCKINFO نتیجه آن است نتیجه ckid برابر است با chars=fmt و همه آن مختصری از وظایف mmiodescend است پس از این ساختار نتیجه گیری بعنوان پارامتر و علامت برای mmio-findchunk است گرفتن آن فایل نشان دهنده ی شروع اندازه گیری chunk است پس از مطرح کردن وظایف mmired بجای ساختارواندازه ی dcmwa vef که به تنهایی با نتیجه پارامتر همراه است cksize آن هدف را خواهد گفت که چند تا از بایتها را بخوانند بعد دسترسی تکه داده ها. استفاده از نقش mmiodesend اگر چه قبل از انجام دادن chunk قالب بندی بالا می آید مطرح کردن mmio و نتیجه هدف ساختار بالا بیاید. این قسمت شروعی برای format chunk خواهد بود

16  Descend to the data chunk by settingthe child.ckid.chars= ' data ' and calling the function mmiodescend passing the child structure and flag mmio_findchunk as its parameters  yse mmioread to read the digital data and into a byte buffer this can be done easily since the size of the data from child cksize is known.  you van then maniplute this digital data buffer, such as chop it add special effect to it. And so on sinse it is jost an arry shich contains nothing but numbers.  write the roff chunk followed bye the format chunk and the data chunk to write the modified file back to the disk.  if you have appended some data to the audio buffer keep in mind to also modify the respective data in the RIFF structure such as the cksize بوسیله داده های chunk نتیجه پایین بیاید chik-chars = 'data' و فراخوان هدف mmiodescend پس از نتیجه ساختار و علامت های mmio-findchunk بعنوان پارامتر داده های رقمی در یک حافظه میانجی و نوع را بخوانید و استفاده کنید cksi2e شناخته شده است این به اسانی انجام می شود. نوشتن riff chunk بوسیله قالب بندی ادامه داده می شود و برگشت فایل به دیسک شما می توانید دست به کاری بینید که حافظه میانجی را اضافه نمیایید. اگر شما اطلاعاتی دارید که آن ها را به داده های صوتی می خواهید افزوده کنید آن را در حافظه riff structure نگه دارید بعنوان cksize.

17 پروژه  برنامه را در برنامه نویسی برای خحواندن بازمی کند یک فایل مجرد در ایستگاه وی داده شده است این تغییر کدکتاب تا اینکه ضمیمه کد فایلها برنامه توسط پروژه های صوتی پیدا می شوند.


Download ppt "1. استاد مربوطه : مهندس آشنا محمودی گرد آورندگان : حدیث السادات آیقی مریم شاهونه."

Similar presentations


Ads by Google