Csound Csound-dev Csound-tekno Search About

guard point

Date1998-01-20 05:53
FromQian Chen
Subjectguard point
Hi there,

Could somebody explain me what *guard point* is in a table?

Thanx
Qian Chen



_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

Date1998-01-20 10:25
FromRobin Whittle
SubjectRe: guard point
Qian Chen  wrote:

> Could somebody explain me what *guard point* is in a table?

This is one extra sample so that an interpolating oscillator or table 
read ugen can interpolate from the last "normal" sample to the next, 
which is the "guard-point" sample.

Normally the guard-point sample is set to the same value as sample 
number 0.  It doesn't have to be that way, but if you want an 
oscillator function to cyclically read through the table, 
interpolating and wrapping around at the end to start again at the 
beginning, the the guard-point sample should be the same value as 
sample number 0.

For instance a table with 9 entries - basically an 8 step waveform in 
sample numbers 0 to 7, with sample 8 being the guard-point.

Sample number       Sample Value

0                   5        *     
1                   6         *
2                   7          *
3                   4       * 
4                   1    *  
5                   2     *
6                   3      *      
7                   4       *
8 (guard-point)     5        +  
                              +
                               +
                            +
                         +
                          +
                           +
                            +
                              etc.

The '*' shows the initial cycle, the '+' shows the next cycle.

Theoretically this could be done without having a guard-point sample, 
but the resulting interpolation code would be slower since it would 
always have to test to see if it was at the last sample. It is better 
to have faster code and slightly longer tables.

Don't trust every aspect of the standard Csound table read ugens! 
More info at:

   http://www.firstpr.com.au/csound/tabread.txt

- Robin



| Robin Whittle         Consumer advocacy in telecommunications, |
|                       especially privacy.                      |
|                                                                |
| First Principles      Research and expression - music, tele-   |
|                       communications, Internet music marketing,|
|                       human factors in technology adoption.    |
|                       Consulting and technical writing.        |
|                                                                |
| Real World Interfaces Electronics and software for music.      |
|                                                                |
|   rw@firstpr.com.au   http://www.firstpr.com.au                |
|                                                                |
|   11 Miller St. Heidelberg Heights 3081 Melbourne Australia    |
|   Ph +61 3 9459 2889  Fax +61 3 9458 1736                      |