Please, insert inside the API the following:
renoise.song().instruments[].samples[].sample_buffer.selected_frame_index
which must return the frame index of the current cursor position of the current sample.
It is very strange that we do not have access to something as basic as the cursor position of the sample. This would greatly facilitate the possibility of building tools to manipulate existing waves.