Sound Synthesis

Any sound imaginable can be synthesised from a combintaion of noise and sine waves whose frequency and amplitude may vary over time.

The way the amplitude of a sound changes over time is called its envelope. Most naturally occuring sounds start out loud and decay to over a certaind amount of time (ie piano note).

Some natural sounds can be very difficult to synthesise (ie piano) while others can be very easy.

Lets start with a simple one. In octave do this :

		octave:1 > noise = 2 * rand (1,3000) - 1 ;
		octave:2 > env = [linspace(0,1,200) linspace(1,0,2800)] ;
		octave:3 > env = env .^ 3 ;
		octave:4 > hihat = noise .* env ;
		octave:5 > slnc = zeros (1,8000) ;
		octave:6 > hihat = [hihat slnc 0.6*hihat slnc 0.5*hihat slnc] ;
		octave:7 > hihat = [hihat hihat hihat hihat] ;
		octave:8 > audio_play (sig)
		octave:9 > hihat = sig ;
		octave:10 > save hihat.dat hihat
		

back.png next.png