Homework 3 (Due: 5/17th) (1) Write a Matlab program that can convert a numbered musical notation (簡譜) into a music file (*.wav). Example: (Twinkle twinkle little stars) score = [1, 1, 5, 5, 6, 6, 5]; % 1: Do, 2: Re, 3: Mi, ….. beat=[ 1, 1, 1, 1, 1, 1, 2]; % 拍子 name= ‘twinkle’; getmusic(score, beat,name) % generate the music file twinkle.wav The Matlab file should be mailed to me. 達到基本要求給 27分 程式的功能越多,考慮的因素越多,分數越高 (35 scores) (2) How does the spectrum of a diphthong (雙母音) vary with time? (10 scores) (3) Why the compression ratio of the color image is twice larger than that of the gray-level image when using JPEG? (10 scores) (4) Suppose that there are 80,000 Chinese characters. The probability for each Chinese character is: 1 80000 P S k (0.999) k k = 1, 2, …, 80000 k 1 k (0 .9 9 9 ) What are the ranges of the average bit length (encoded as the binary form) if (a) the Huffman coding and (b) the arithmetic coding are applied? (15 scores) (5) (a) Why the normalized root mean square error (NRMSE) may not reflect the similarity between two images? (8 scores) (b) Can the NRMSE measure the similarity between two audio signals? Why? (7 scores) (6) Design the fast algorithm of the 4-point DCT with the least number of nontrivial multiplications. F m C m 2 3 f n co s n0 m, n = 0, 1, 2, 3 ( 2 n 1) m C[0] = 1, C[m] = 2 for m 0 8 (15 scores)