sound fading:

#====================================================================
 # fade a sound in (normal amplitude is reached at "startWind"
 # and fade out again at the end (start fading from total duration of sound - "endWind"
 #====================================================================

procedure fade_proc sound$ startWind endWind

   select Sound 'sound$'
   endtime = Get total duration
   Formula... if x < startWind then self * (x/startWind) else self fi
   Formula... if x > ('endtime') - endWind then self * (('endtime'-x)/endWind) else self fi
endproc

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s