CS 111 - 4/24/14
Exam 2 Statistics
Count: 88
Max: 100
Min: 16
Ave: 71.76
Mean: 75
St. Dev: 18.43
100's: 1
90's: 16
80's: 18
70's: 13
60's: 19
50's: 9
40's: 7
30's: 3
20's: 1
10's: 1
Fading in and out of sound
At each sound sample the volume multiplier will
be different.
We first determine a length of time for the fade
Assume we want to fade in over 3 seconds and the
sampling rate is 22050 samples per second
So the fade needs to occur over the first 66150 samples
at sample 0, our volume multiplier would be 0
at sample 16537, the volume mult. would be 0.25
at sample 33074, the volume mult. would be 0.5
at sample 66149, the volume mult. would be 1
A general formula would be
at sample x, the volume mult. must be a double
which would be:
double mult = x/66150.0;
S1 contains 220568 samples
S1 has a calculated length (in seconds) of: 10.003083900226757
Time prior to sorting: Thu Apr 24 11:17:25 CDT 2014
Time after sorting: Thu Apr 24 11:37:17 CDT 2014