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

Next-value and Previous-value Parameters

In order to play a note, it is sometimes necessary for an instrument to know what value one or more parameters will have for the next note. For instance, an instrument might be designed which glisses during the last portion of its performance (perhaps only when a slur is indicated) from its written pitch to the pitch of the next note. This can only be done, of course, if the instrument can know what the pitch of the next note will be.

The necessary information can be provided using next-value parameters. A next value parameter might be declared by

     !next p5 "p6" 

which is interpreted to mean that for the current instrument, p6 will contain the next note's p5 value. This holds true globally for all occurences of this instrument until further modifications. If for any reason you wish to override this value, p6 may be filled in explicitly. This is sometimes useful for the last note of a section, for which p6 will otherwise assume the p5 value for the current note. The next-value feature is illustrated in the Scot example II.

The necessary information may also be provided using standard numeric score next-value parameters. A parameter argument containing the symbol npx (where x is an integer) will substitute parameter number x of the following note for that instrument. Similarly, the value of a parameter occurring during the previous note may be referenced with the symbol ppx (where x is an integer). Details of the next- and previous-value parameter feature may be found in the Numeric Scores section.

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

HTML Csound Manual - © Jean Piché & Peter J. Nix, 1994-97