12 ( TV TV, CATV, CS CD, DAT, DV, DVD ( 12.1 12.1.1 1 1: T (sec f (Hz T= 1 f P a = N/m 2 1.013 10 5 P a 1 10 5 1.00001 0.99999 2,3 1
2: 3: 12.1.2 A, f, φ f(t = A sin(2πft + φ = A sin(ωt + φ ω 2πf 440Hz A ( ( 4 ( 5 f(t = sin(2πf 1t + sin(2πf 2 t = 2 sin(2πt(f 1 + f 2 /2 cos(2πt(f 1 f 2 /2 2 3 6 5: 4: 6 12.2 ( 6 2
6: 16Hz 25000Hz 10 3 10 9 P 0 = 2 10 5 N/m 2 10 8 1 mm ( 10 a(t P = 2 dt (SPL P 0 = 2 10 5 N/m 2 ( ( P 2 L p = 10 log 10 = 20 log 10 (db, PP0 P 2 0 T ( 1000Hz ( 7 7: 120dB 3
(phon 70 1,000Hz 70(dB 12.3 DSP(Digital Signal Processing, 12.3.1 A/D ( 8 ( ( A/D (ADC (1 (2 (quatization ( σ ( 8 ( t (S r =1 = 1 t (Hz x c (i 8: 12.3.2 f 2 2f < S r 1 2 S r ( 9 4
4 9 1 10( 2 S r 1 2 f S r f ( 10( ( f ( f a = ks r ± f (k = 1, 2, 3,... ( 10 ( S r 1 2 S r ( 11 12.3.3 ( ( 12 x c (i ( xc (i s(i = round Q Q ( round( n x c n Q Q2 n 1 x c (i Q2 n 1 2 n 1 s(i 2 n 1 n Q2 n 12.3.4 ( x(i = Qs(i x(i x c (i Q 2 5
9: 1/2 Sr - f Sr Sr 1/2 Sr 10: f Sr Sr - f f 1/2 Sr 1/2 Sr 11: 6
Q 12: ( ( 13 D = 10log(V 2 /(V/2 n 2 = 20log2 n = 20nlog2 = 6.02n V 2V V 2V/(2^n-1 =:= 2V/2^n=V/2^(n-1 0 V/2^n -V 13: CD, 16 97.8dB DVD, 24bit 145.8dB 90dB 12.3.5 D/A D/A (DAC 7
1. ( 14 2. 14: D/A 12.3.6 D/A 12.4 CODEC(Compression & Decompression, COder & DECoder 12.4.1 PCM(Pulse Code Modulation A/D CD 44.1 KHz 0 22.05KHz 16 74 16 44100 / 60 / 74 2 ( 8 / 783,216,000 780 Mbyte S r n = 705.4Kbps 12.4.2 DPCM(Differential PCM 8
12.4.3 ( 15,16 m a 1,..., a m ˆx(i = a 1 x(i 1 + a 2 x(i 2 +... + a m x(i m d(i = x c (i ˆx(i ( s(i = d(i x(i 1 = i ( m = 1, a 1 = 1 DPCM d(i 15: DPCM - + i=i+1 + 16: DPCM s(i 0 s(i Huffman ADPCM(Adaptive DPCM 12.4.4 ( lossy MPEG2/Audio NBC 20KHz 64Kbps 40MB/stereo 60 9
(PCM 1.5 /sample 16 64 705.4 = 1.45 PCM 20.05KHz, 705.4Kbps (16 44.1 ISBN4-274-12960-8 10
// sineau.java // au // // 8kHz 8 PCM public static void main(string arg[] int i; // (C 1999/9/3 // // http://urd.naklab.dnj.ynu.ac.jp/~komachi/java/doc/wavtoau.java (JAVA // for (i = 0; i < arg.length; i++ // // http://urd.naklab.dnj.ynu.ac.jp/~komachi/java/doc/wavtoau.class (JAVA // System.out.println(arg[i]; // http://urd.naklab.dnj.ynu.ac.jp/~komachi/java/doc/wavtoau.html ( // // // if ((arg.length < 3 (arg.length > 3 // http://www2s.biglobe.ne.jp/~satosi/soft/index.html // http://www2s.biglobe.ne.jp/~satosi/soft/wav2aucnv/wav2aucnv.txt import java.io.*; import java.lang.math; class sineau static void usage( System.out.println("Usage: makeau 440 5 file.au"; System.out.println("(440Hz (int, 5sec (int, output file name."; System.out.println("8000Hz/8bit/mono"; static void tobyte(int i, byte b[] // int byte b[0] = (byte ((i >> 24 & 0xff; b[1] = (byte ((i >> 16 & 0xff; b[2] = (byte ((i >> 8 & 0xff; b[3] = (byte (i & 0xff; static void generate(int freq, int len, String auname FileOutputStream fout; try fout = new FileOutputStream(auname; catch(exception e System.out.println(auname + " cannot create"; return; try // // 24 // 8 usage(; return; else // String aufile; int freq, len; int l; // try freq = Integer.parseInt(arg[0]; catch (Exception e System.out.println("argument must be interger:"+arg[0]; return; // try len = Integer.parseInt(arg[1]; catch (Exception e System.out.println("argument must be integer:"+arg[1]; return; // l = arg[2].lastindexof("."; if (l >= 0 aufile = arg[2].substring(0, l + ".au"; else aufile = arg[2] + ".au"; // ".snd" byte b[] = 0x2e, 0x73, 0x6e, 0x64; //., s, n, d fout.write(b; // 1 // 32 tobyte(32, b; fout.write(b; // 2 generate(freq, len, aufile; // (8000 sample/sec * int size = 8000*len; // 5 seconds tobyte(size, b; fout.write(b; // 3 // 2: 8-bit linear PCM tobyte(2, b; fout.write(b; // 4 // 8kH = 8000 tobyte(8000, b; fout.write(b; // 5 // 1 tobyte(1, b; fout.write(b; // 6 // byte b0[] = 0, 0, 0, 0; fout.write(b0; // 7 fout.write(b0; // 8 // (8bit, signed, [-128, 127] int u; for (u = 0; u < size; u++ // double a = 2.0*Math.PI*freq/8000.0; // 2*pi*f/8000 fout.write((byte(126*math.sin(a*u; fout.close(; System.out.println(auname + "... created"; catch (Exception e System.out.println("file write error"; 11