QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next Section  

GEN28

     f  #  time  0  28  filcod

DESCRIPTION

This subroutine is used to read a text file which contains sets of three values representing the xy coordinates and a time-tag for when the signal should be placed at that location for use by the space and spdist  opcodes. The file should look like:

        0       -1       1
        1        1       1
        2        4       4
        2.1     -4      -4
        3       10      -10
        5       -40      0

If that file were named "move" then the Gen28 call in the score would like:

        f1 0 0 28 "move"

Gen28 takes 0 as the size and automatically allocates memory. It creates values to 10 milliseconds of resolution. So in this case there will be 500 values created by interpolating X1 to X2 to X3 and so on, and Y1 to Y2 to Y3 and so on, over the appropriate number of values that are stored in the function table. In the above example, the sound will begin in the left front, over 1 second it will move to the right front, over another second it move further into the distance but still in the left front, then in just 1/10th of a second it moves to the left rear, a bit distant. Finally over the last .9 seconds the sound will move to the right rear, moderately distant, and it comes to rest between the two left channels (due west!), quite distant. Since the values in the table are accessed through the use of a time-ponter in the space unit, the actual timing can be made to follow the file's timing exactly or it can be made to go faster or slower through the same trajectory. If you have access to the GUI that allows one to draw and edit the files, there is no need to create the text files manually. But as long as the file is ASCII and in the format shown above, it doesn't matter how it is made!
 

AUTHOR:

Richard Karpen
Seattl;e, Wash.
1998

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next Section 
HTML Csound Manual - © Jean Piché & Peter J. Nix, 1994-97