"I do not completely understand the Description of the Max5 cycle~: when
should I make the 513th sample the same as the 512th and when should I
use the first? The latest implementation always uses the first."
you should never make the 513th the same as the 512th.
The idea is that it operates with a 512 size table, but internally it needs 513 points, where the 513th is for interpolation and needs to be the same as the 1st point.
So, when a user specify a 512 size table, the cycle~ documentation in Max5 says it'll create a 513 points table where the 513th point is the same as the 1st.
This happens cause it is a simple linear interpolation. In Pd we have a 4 point interpolation in objects such as tabread4, so you need the first point to be the same as the last, and also need two extra last points to be the same as the first two points (so you need 3 extra points). The sinesum command for tables will generate these extra points automatically, and tabosc4~ will read these wavetables also in the correct way.
Back to max 5 documentation and cycle~... It also says that if someone is specifying a 513 size table, that they should make sure that the 513th sample is the same as the 1st. Because in this case the object won't do anything and will just get the specified table.
So creating a copy of the 1st sample to be the 513th sample is a behaviour in cycle~ only for given tables that are 512 in size. This is what I was asking you, if it really behaved that way. What do you say?
This makes me believe that when you specify a bigger table, like 1024, and start offsetting it, that it won't do anything to make this interpolation perfect, but it'll consider the "extra" 513th point in the table to be the same as the first. This is not a real problem in the real world, you can't really perceive it...
cheers