Download presentation
Presentation is loading. Please wait.
Published byBlaze Corson Modified over 9 years ago
1
Audio 2 Subject:T0934 / Multimedia Programming Foundation Session:9 Tahun:2009 Versi:1/0
2
Bina Nusantara Learning Outcomes In the end of this session, students must be able to: –Understand the basic principal of audio format and compression –Apply Java Sound API syntax to manipulate basic audio properties
3
Outline Audio Coding Audio Compression Java Sound API Bina Nusantara
4
PCM PCM (Pulse Code Modulation) quantized sample output –Differences versions is called DPCM –Much-simplified version of DPCM is called DM (Delta Modulation –Adaptive version is called ADPCM PCM encodings –Linear quantization –Non-linear quantization Bina Nusantara
5
Linear quantization samples are typically stored as uniformly quantized values Compact discs, for example, use linear PCM-encoded sound. Bina Nusantara
6
Non-linear quantization maps the original sound's amplitude to the stored value using a nonlinear function Mu-law encoding and A-law encoding are common nonlinear encodings, usually used for telephony or recordings of speech. Bina Nusantara
7
PCM Coding Process Bandlimiting filter Mu-law/A-law compressor Linear PCM Digital to analog converter Mu-law/A-law decompressor Low-pass filter Bina Nusantara Input analog signal Output analog signal Bandlimiting filter blocks out very low and high frequencies Low-pass filter allows only frequencies up to the original signal to be retained Bandlimiting filter blocks out very low and high frequencies Low-pass filter allows only frequencies up to the original signal to be retained
8
WAVE format Bina Nusantara The WAVE file format uses Microsoft's RIFF (Resource Interchange File Format) standard for the storage of multimedia files. A RIFF file starts out with a file header followed by a sequence of data chunks. RIFF header chunk fmt chunk data chunk identifies the file as a WAV file describes the sound data's format such as : type of compression number of channels sample rate bits per sample other attributes contains the size of the data and the actual sound
9
MPEG-1 audio Has three layers of audio compression The higher layers, the better compression Bina Nusantara Digital Audio Tape Layer 1 Proposed for use in digital audio broadcasting Layer 2 Originally aimed at audio transmission over ISDN lines Common digital audio format compression Layer 3 (MP3)
10
MPEG-1 audio Format Bina Nusantara Synchronization code Sampling rate Bitrate Stereo information Header SBS Format SBS (subband-samples) SBS (subband-samples) Ancillary data (extra information) Ancillary data (extra information) Multilingual data Surround-sound data
11
MPEG-2/4/7 MPEG-2 –Standard for DVD –MPEG-2 Advanced Audio Coding (AAC) can have five channels (5.1 channel systems) MPEG-4 –Integrates several different audio components into one standard –Audio components include speech compression, text-to-speech, and MIDI MPEG-7 –Promotes ease of search for audio objects –Supports ASR (Automatic Speech Recognition) application Bina Nusantara
12
Java Sound API Play and stop sampled audio Volume up and down Right and left channel balance Play and stop MIDI Bina Nusantara
13
Sound Property Bina Nusantara - Get duration Midi File Sampled Sound File - Get Audio Format - Get duration - Get Sample Rate - Get Channels
14
Sample Code Bina Nusantara To Play Sampled Sound To Control Volume and Balance Sampled Sound To Play Midi
15
Sample Code Bina Nusantara Create JSlider to control Balance and Volume Sampled Sound
16
Sample Code Bina Nusantara Result
17
References WAVE PCM soundfile format. 2003. http://ccrma.stanford.edu/courses/422/projects/WaveFor mat/ http://ccrma.stanford.edu/courses/422/projects/WaveFor mat/ WAV File Format. 2009. http://technology.niagarac.on.ca/courses/ctec1631/WavF ileFormat.html http://technology.niagarac.on.ca/courses/ctec1631/WavF ileFormat.html The Java Sound API. 2009. http://onjava.com/onjava/excerpt/jenut3_ch17/ http://onjava.com/onjava/excerpt/jenut3_ch17/ MP3. 2009. http://en.wikipedia.org/wiki/MP3http://en.wikipedia.org/wiki/MP3 WAV. 2009. http://en.wikipedia.org/wiki/WAVhttp://en.wikipedia.org/wiki/WAV Bina Nusantara
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.