i haven't checked your replacement in detail but a working example can be found at discrete hilbert transforms if that's what you are looking for there are two key concepts in the article fully half of the main section and all of the math is devoted to the concept depicted in the figure which is that of doing piece wise convolution and creating a seamless result one has to understand that before the next step makes sense and it is easier to understand without the unnecessary complexity of circular convolution divide and conquer it's about teaching and understanding not efficiency the details of circular convolution aren't included here because they are explained in other articles