New Tool (2.7): Play Song From Beginning

What if you would move these two lines before the os-clock delay-timer routine?:
renoise.song().transport.loop_pattern = false
renoise.song().transport.playback_pos = startpos
Then play by increasing the 0.2 value and see if the other ReWire host simply needed some breathing space to readjust his song-positioning.
I don’t think you can do more than that in this regard.

  
---------------------------------------------------------------------------- vV's Panic F5   
--F5 - panic, switch loop pattern off, go to first row, start playback.  
local function set_start_and_play()  
 local startpos = renoise.song().transport.playback_pos  
 renoise.song().transport.loop_pattern = false  
 startpos.sequence = 1  
 startpos.line = 1  
 -- renoise.song().transport.loop_pattern = false  
 renoise.song().transport:panic()  
 renoise.song().transport.loop_pattern = false   
 -- renoise.song().transport.playback_pos = startpos  
 local start_time = os.clock()  
 while (os.clock() - start_time < 0.2) do  
 -- Delay the start after panic. Don't go below 0.2 seconds   
 -- or you might tempt some plugins to crash and take Renoise in the fall!!   
 end  
  
 renoise.song().transport:start(renoise.Transport.PLAYMODE_CONTINUE_PATTERN)  
end  
  

So far pressing F5 will just start from playing the pattern you are at - when in ReWire mode. Otherwise it does start from the first pattern.

It seems that the playback -signifier in the orderlist does, very briefly, show Renoise playing the first row of the orderlist, but then it immediately jumps to the pattern your cursor is on…

I think then that is simply because the master is instructing Renoise to change positions to where the master currently is, so for some reason you can’t reset the play positions in the Master through Lua.

You know vV, this is pretty strange. Nowadays the F5 works (even with Renoise running alone), as a way to “continue from where you played last”. It does not in any way start from the start.
I wonder if it’s related to this:

local function set_start_and_play()  
 local startpos = renoise.song().transport.playback_pos  
 renoise.song().transport.loop_pattern = false  
 startpos.sequence = 1  
 startpos.line = 1  
 renoise.song().transport.playback_pos = startpos  
 renoise.song().transport:panic()  
 renoise.song().transport.loop_pattern = false  
 local start_time = os.clock()  
 while (os.clock() - start_time < 0.4) do  
 -- Delay the start after panic. Don't go below 0.2 seconds   
 -- or you might tempt some plugins to crash and take Renoise in the fall!!   
 end  
 renoise.song().transport.loop_pattern = false  
 renoise.song().transport:start(renoise.Transport.PLAYMODE_CONTINUE_PATTERN)  
end  
  

to this: renoise.song().transport:start(renoise.Transport.PLAYMODE_CONTINUE_PATTERN)

Nopes, it is the startpos setting before panicing that cause song continue. (The panic mode stops the repositioning routines in Renoise before the songposition is initialized, thus Renoise will continue from where it was playing)

You also defined loop_pattern = false on multiple places, i suspect you would propably clean that up, but i did the clean up for you here:

  
local function set_start_and_play()  
 local startpos = renoise.song().transport.playback_pos  
  
 renoise.song().transport.loop_pattern = false  
 startpos.sequence = 1  
 startpos.line = 1  
  
 renoise.song().transport:panic()  
 renoise.song().transport.playback_pos = startpos  
  
 local start_time = os.clock()  
  
 while (os.clock() - start_time < 0.4) do  
 -- Delay the start after panic. Don't go below 0.2 seconds   
 -- or you might tempt some plugins to crash and take Renoise in the fall!!   
 end  
  
 renoise.song().transport:start(renoise.Transport.PLAYMODE_CONTINUE_PATTERN)  
end  
  

Btw, have you tried fumbling with this option regarding ReWire?:
– Immediately start playing at the given sequence position.
renoise.song().transport:trigger_sequence(sequence_pos)

Thank you, seems to work, I’ll test this with Ableton Live ReWire Renoise :)
Ok, works in Renoise singularly but not when Ableton Live is ReWire Master and Renoise Slave. However, now that it works in Renoise solo-mode, that’s already better than not working at all :)