CPS/CIS600 - Final project report
- Sampling Frequency
- 8000 Hz. An "au" file format supports this frequency.
- Default Frequency
- It has been designed the default period 2 * PI * 10. So, the default frequency is about 127.3 Hz ( 8000 / (2 * PI * 10)).
- The rate of increase/decrease.
- All the factor of increase/decrease are fixed as 0.1. So, it will be changed 10 % when an adjustment button is clicked.
- The order of Sound generating
- Measure the amplitude at the particular point.
- Get the ratio of height comparing to the height of drawing canvas. It reflects the ratio of the amplitude.
- Convert the amplitude as 16 bit linear value.
- The first value of the amplitude just reflects the ratio to height of canvas. It could be converted as 16 bits with multiplying 2^15 or -2^15. Unlike the actual displaying waves, the actual sound value has the reverse sign. It dues to the graphic coordination. (Topleft corner is the origin and no negative.) I did not adjust it because it hardly affects the actual sound.
- Convert 16 bit linear value to mu-law value.
- Using the mu-law conversion formular, 16 bit linear value can be converted as mu-law 8 bit value.
- Collect the 8 bit mu-law value as many as 8000 and play it.
- 8000 means the 1 second length sound because 8000 Hz sampling frequency has been used.
Go back to J. Kim's Project Home for CPS/CIS600.