the internal clock does not have a time signature, it knows only units of 1 beat.
when internal clock is used, the result of clock.get_beats() simply returns the number of beats since the clock was started. clock.internal.start(value) will reset this counter to value. (or zero by default.)
try it yourself:
function init()
clock.run(loop)
end
function loop()
while true do
print("current beat: ".. clock.get_beats())
clock.sync(0.25)
end
end
function key(n,z)
if n == 3 and z > 0 then
clock.internal.start()
end
end
this should print out an ascending sequence of numbers, reported every 0.25 beats (approximately) and resetting to zero when key 3 is pressed.
if you are seeing something else, the clock source is probably set to MIDI or Link.
if you find the handling of clock phase in Link a little confusing (as i do) you should read the section on “Phase Synchronization” here: Link Documentation | Ableton
as @glia says, generation of musical logic in sequences is generally the job of a script, and it seems to me that your question should probably be directed at a particular script.