100 likes | 271 Views
Image and Sound Editing. Raed S. Rasheed 2012. Digital Sound. Pitch digital sound Echo digital sound Fade in digital sound Fade out digital sound. Pitch digital sound.
E N D
Image and Sound Editing Raed S. Rasheed 2012
Digital Sound • Pitch digital sound • Echo digital sound • Fade in digital sound • Fade out digital sound
Pitch digital sound • Is the process of changing the speed or duration of an audio signal. The simplest way to change the duration or pitch of a digital audio clip is to resample it. This is a mathematical operation that effectively rebuilds a continuous waveform from its samples and then samples that waveform again at a different rate. When the new samples are played at the original sampling frequency, the audio clip sounds faster or slower
Pitch digital sound ALGORITHM Sound_Pitch 8.1 01 INPUTSound, rate 02 OUTPUTNewSound 03 BEGIN 04 Create new sound file NewSound; 05 SET index = 0, c = 0; 06 WHILE index < Sound.Length 07 SETi= tranc(index); 08 SET frac= index - i; 09 SET S1 = Sound[i]; 10 SET S2 = Sound[i+1]; 11 SET NewSound[c] = S1 + ( S2 – S1) * frac; 12 SET c = c+1; 13 SET index = index + rate; 14 END WHILE 15 RETURN NewSound; 16 END
Echo (Reverb ) digital sound • is the persistence of sound in a particular space after the original sound is produced. A reverberation, or reverb, is created when a sound is produced in an enclosed space causing a large number of echoes to build up and then slowly decay as the sound is absorbed by the walls and air.
Echo (Reverb ) digital sound ALGORITHM Sound_Echo 8.2 01 INPUTSound, delay, decay 02 OUTPUTNewSound 03 BEGIN 04 SETdelaySample = delay; 05 SETi = 0; 06 WHILEi < Sound.Length 07 IF i < delaySampleTHEN 08 SET NewSound[i] = Sound[i]; 09 ELSE 10SET NewSound[i] = Sound[i] + Sound[i- delaySample] * decay; 11 END IF 12SET i= i + 1; 13END WHILE 14 RETURN NewSound; 15 END
Fade in digital sound ALGORITHM Sound_FadeIn 8.3 01 INPUT Sound 02 OUTPUTNewSound 03 BEGIN 04 SETdecayRate = 1 / Sound.Length; 05 SETdecay = 0; 06 SETi = 0; 07 WHILEi < Sound.Length 08 SET NewSound[i] = Sound[i] * decay; 09 SET i= i + 1; 10 SET decay= decay+ decayRate; 11END WHILE 12 RETURN NewSound; 13 END
Fade out digital sound ALGORITHM Sound_FadeOut 8.4 01 INPUT Sound 02 OUTPUTNewSound 03 BEGIN 04 SETdecayRate = 1 / Sound.Length; 05 SETdecay = 1; 06 SETi = 0; 07 WHILEi < Sound.Length 08 SET NewSound[i] = Sound[i] * decay; 09 SET i= i + 1; 10 SET decay= decay - decayRate; 11END WHILE 12 RETURN NewSound; 13 END