Renoise transport playback position jump via lua scripting

Linux Mint 14 XFCE desktop 64 bit…

Hi, I was wondering if someone would be good enough to just clarify this for me :)

Some steps…

  1. I’ve attached a very simple XRNS to this post, it contains just one pattern with a single kick sample. Start the pattern playing in Renoise (I know not the greatest module ever written but still… :D)

  2. Open up the scripting terminal editor and go to the terminal (make sure Renoise is playing the pattern in the background.)

  3. Type and execute the command:  

This instructs Renoise to start playing at line 1 (line 0 in the pattern editor). So the kick is once again immediately heard once the enter key is pressed. This works fine.

  1. Type and execute the command: = 0  

Again this instructs Renoise to effectively jump to line 1 (beat 0). The kick is again immediately heard once the enter key is pressed. And again this works.

  1. Now try the command (make sure Renoise is still playing the pattern in the background): = renoise.SongPos(1,1)  

On my machine each time I execute the above command I don’t hear the kick as Renoise jumps to the start of the first line in the pattern. Audibly it seems to jump to the next line down (or the effect is somewhere fractionally between line 0 and 1.) Can someone just clarify if this slight delay/missed starting line on the execution of the above command is correct?

Funny. It’s the exact same indeed on Win7 64bit. I don’t know if it should be called a delay, but indeed it does not play the sound, although when not playing the same command puts the cursor/playhead on the first line.

Okay Cas, thank you for confirming that our ‘miss the start line’ using SongPos and isn’t just on Linux :)

I find that to get it to kinda work I would use two commands in a script: = seqindex --first set the pattern sequence index --then jump to the line and continue play in the pattern  

Or if it’s playing already you could just playback_pos_beats as a workaround? (You can set it to float numbers too I believe)

I considered using playback_pos_beats but (probably because I’m lazy wink.gif) it would now require to calculate the float beat position from the start of the song to get the desired pattern and line. Then I thought (although now I’m just guessing) that if the user changes the LPB during the course of the song in the pattern…well I didn’t want to get into it just in case smile.gif