New Tool: Function Midi Slave!

i got frustrated with renoise’s built in midi-slave code so i made my own.

it works pretty well from what i can tell. depending on your settings, of course.

if you have significant tempo changes, you’ll want to lower the clock buffer size and increase bpm change speed,
if not you might want a higher buffer and a lower speed.

this will basically NEVER go out of sync as there is built-in drift compensation.
this will only work if you have a song that has patterns where the length is a multiple of the lines per beat.
this tool uses that information to make sure it’s “on track” with the midi clock signal it’s getting.

i don’t know lua so i’m sure there are a thousand errors in here. if anyone wants to tell me what i could do to make it better and/or more
correctly coded, let me know. there are definitely still some bugs in here.

2134 org.vesabios.TempusTransport.xrnx.zip

oh, and i wrote this so i could slave renoise to a monomachine & machinedrum. they send program changes as pattern change indicators, which is unusual, compared to the traditional “song position” pointer. i wrote some code to use that information to jump to the SEQUENCE number corresponding to the pattern coming in. it’s a little weird but there’s no perfect way to translate that information. if you don’t use a monomachine just turn that part off.

P.S. ATTENTION developers, please take a look at what i did here and consider integrating something like it into renoise please!

Hey thanks a lot in_tense!
Your input is very much appreciated!

I’m downloading a zip, not a .xrnx!

xrnx is zip, rename?

Scratch that, I personally had problems installing. The package should be reviewed. This could be Renoise related (Can’t deal with a space?)

  
Error Message: Failed to copy the script into the destination folder (zip error: 'Failed to open the destination file for writing:  
Error Message: '/Users/dac514/Library/Preferences/Renoise/V2.7.1/Scripts/Tools/org.vesabios.Tempus Transport.xrnx/Bitmaps/''). Script installation failed.  
  

Once I manually installed the tool, I got:

  
*** std::logic_error: 'ViewBuilder: invalid index for popup: '2'. value must be [1 - 1].'  
*** stack traceback:  
*** [C]: in function 'popup'  
*** main.lua:254: in function 'mono_transport'  
*** main.lua:10: in function <10><br>
<br>```

</10>

sorry, i’m a noob. i’ll work on it some more tonight and repost.

well i at least got it packed up into an XRNX file here, i think i fixed a couple of bugs. it’s working fine for me here, in terms of install/uninstall and usage.

Latest version installs and launches fine. Cheers!

One improvement to get rid of the API error:


– Helper Function

local function show_status(message)
renoise.app():show_status(message)
print(message)
end

local input_device

local bpm = 120
local lpb = 128


function mono_transport()

lpb = renoise.song().transport.lpb


LPB is not known when Renoise is started so fill the actual LPB when the function is called instead of during the tool load.