next up previous
Next: Changing the amplitude over Up: A Manual for TrikTraks Previous: Determining the starting and

Playing the initial and final states

With the above datafile, the sound starts and its frequency immediately begins descending. When it reaches its goal, the sound immediately stops.

Sometimes it's useful to hear the initial and final states as steady tones, before and after the transformation. Here's how you can do it:

     output(sound.wav)    # name of the output soundfile
     duration(5)          # duration of the sound
     initial(1)           # play the initial state for these many seconds
     final(1)             # play the final state for these many seconds
     
     20 40                # element 0: duration in samples
     1000                 # amplitude
     
     30 60                # element 1: duration in samples
     -10000               # amplitude
     
     40 80                # element 2: duration in samples
     10000                # amplitude
     
     10 20                # element 3: duration in samples
     -500                 # amplitude

Two commands are given to TrikTraks: initial(1) and final(1).

This means that the initial state will be played for 1 second, after which the transformation will begin, reach its final state, and then the final state will be played for 1 second. The total duration of the sound will thus be 7 seconds.

So you will hear the first state for 1 second, a 5 second glissando to the final state, and then the final state for 1 second.

Easy, eh?


next up previous
Next: Changing the amplitude over Up: A Manual for TrikTraks Previous: Determining the starting and
Arun Chandra
arunc@evergreen.edu