Two important points:
- Don't join the curves (you want to sample two independent curves, not sample a joined curve - joined curves change indices)
- You need to offset the curve before the "Float Curve".
- Since you're sampling by index, moving the points won't change which point you're sampling, it's Y will remain unchanged
So, for shifting the curve, change the value in the add node below (for curves whose X length is different from 1, you can take the "fac" instead of the "length")


This is where you should do all the shifting math (you can multiply the length in both curves if you want to have a zoom out, for instance):

You can make it upside down after the float curve as the original file, you just shouldn't shift X after.
I tidied up the rest of the nodes:
- Notice that the curves are not joined until the end
- Simplified many things

Making a two part wave

For your goal of making a two part wave, I guess you should create a node group that makes the wave and then you control it from outside.
- Use a single X parameter for offseting
- Notice the length of the line is 2 now
- To sample the second half, offset X
- First half will work from length 0 to 1
- Second half will work from length 1 to 2

Then outside you make the two waves and follow the same idea as before:
- The first add is the X offset
- The floored modulo makes it cyclic (if you want flat ends, remove it)

File
