next up previous
Next: Determining the initial and Up: A Manual for TrikTraks Previous: Playing the initial and

Changing the amplitude over time

Let's suppose you wanted the tone to make a decrescendo over its duration.

Make the following changes to the datafile you created in the last step:

     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 -500            # amplitude

     30 60                # element 1: duration in samples
     -10000 500           # amplitude

     40 80                # element 2: duration in samples
     10000 -500           # amplitude

     10 20                # element 3: duration in samples
     -500  500            # amplitude

Notice that the amplitude for element 0 changes from 1000 to -500, element 1 changes from -10000 to 500, and elements 2 and 3 also change their amplitudes.

Save the file as ``data3'', run TrikTraks on it, and play the resulting soundfile with MediaPlayer. You should hear the same glissando, except now it will reduce in volume.

If you wanted to make a crescendo, you would do the same thing, only making sure that the greatest difference of amplitudes in the final state is larger than greatest difference in the initial state.



 
next up previous
Next: Determining the initial and Up: A Manual for TrikTraks Previous: Playing the initial and
Arun Chandra
arunc@evergreen.edu