Changing song position with midi or osc

I want to usemy controler to increment or decrement the playhead position within the Edit window,
Ifound this topic :

But it does not seem to work anymore ( attempt to call field ‘tool’ (a nil value))
Does anyone can help me ?
PS: i don’t find the option on the midimapping

1 Like

How did you attempt to run the code?

I think any reference to renoise:tool() has to happen in the context of a tool being installed.

The other code works fine in the dev editing window for me.

I have this working.

1: Copy GlobalMidiActions.lua to you scripts folder if it’s not already there
2. Add this code at the end:

add_action("Navigation: Increment edit pos",
  if message:is_trigger() then
    local pos_queue =  
 pos_queue.line =   pos_queue.line + 1 = pos_queue  

3: Start Renoise, hit ctrl+M (or option + M on mac, I think) to bring up the MIDI mapper.

4: Look under “Navigation” for “Increment edit pos” and map it to some MIDI command.

You can do the same to move the edit position the other way.

1 Like

Ok thank you very much I’m tottaly new to Lua, and don’t understand a thing.

If i put it in the root of the script folder, it keep saying:
Script Error
GlobalMidiActions.lua:10: attempt to call field ‘tool’ (a nil value)

If i put it under Tools it don’t do anything

I use the last version of Renoise

Use the exact code I posted. This is not a tool, so the code can’t reference the tool API.

Ok i understand, but where is this file
If i create only it with only your script addactionis not declared

I found it sorry

Thank you very much

May be more, what about changing column position ( vol , pan , … )
I tried “pos_queue.column” but not working

Well this gets more complicated as you need to look at the Renoise scripting API, but I believe it’s all doable.