With mono, 16 bits, 22 kHz,
PCM encoding, how many bytes of data will be generated by a three minute
sound recording? Ans: 3min*60sec/min*22000samples/sec*16bits/sample*1/8 bytes/bit= 7.92MB.
A one second piano sound
at F octave 4 can be encoded as 9 bytes in MIDI code. Neglect the header
overhead. What is the compression ratio achieved by MIDI compared
with PCM encoding using 16 bit, 44kHz for the same one second piano sound?
60 91 41
7f Note on, note=65, (F, octave
4), vel=127 8140
81 41 40 Note off, note=65,
vel=64 after 192/192 quarternote
assume the tempo is 1 second
for one quarternote.
Ans: 0x8140 delta time specifies the time between note on and note off for (F, octave 4). The seven bits from both bytes forms the binary value, 1100000, or 192, of the ticks representing the elapsed time. Here one quarter note is 192 ticks. The note 65 is played for one quarternote or one seconds. It takes 9 bytes to represent these two midi events.
While using PCM encoding, it takes 16bits/sample*44000sample/sec*1sec*1/8bytes/bit=88000 bytes.
The compression ratio = 88000/9= 9778.