next up previous
Next: Determining the starting and Up: A Manual for TrikTraks Previous: The steps to create

Changing the frequency over time

Here's the same datafile as above.

     output(sound.wav)    # name of the output soundfile
     duration(5)          # duration of the transformation
     
     20                   # element 0: duration in samples
     1000                 # amplitude
     
     30                   # element 1: duration in samples
     -10000               # amplitude
     
     40                   # element 2: duration in samples
     10000                # amplitude
     
     10                   # element 3: duration in samples
     -500                 # amplitude

This created a static tone for 5 seconds.

Make the following changes to your datafile:

     output(sound.wav)    # name of the output soundfile
     duration(5)          # duration of the transformation
     
     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

Element 0 (duration) now is given two values: an initial value of 20 samples and a final value of 40 samples. This means that this element will begin with a duration of 20 samples and will slowly change until, at the end of the transformation, its duration will be 40 samples.

Something similar happens to elements 1, 2, and 3: their durations begin with one value and end with a value twice as big.

For all the elements, the amplitude stays the same.

Make the changes above, save the file as ``data2'', run TrikTraks on it, and play the result in the MediaPlayer. You should hear a 5-second sound that goes down in pitch.



 
next up previous
Next: Determining the starting and Up: A Manual for TrikTraks Previous: The steps to create
Arun Chandra
arunc@evergreen.edu