Remotely accessible repl?

I would like to be able to access a Renoise Lua repl from outside of Renoise (whether over TCP, a unix domain socket, or through some external text-only client running in a terminal), with the ultimate goal of using the repl to feed Renoise chunks of Lua code from inside Emacs and read responses back from Renoise.

I know it’s possible for Renoise to load and run Lua scripts that were edited in an external editor, but this requires manual interaction with the Renoise Scripting Editor that make me take round-trips from Emacs in to Renoise’s Scripting Editor and back, which slows down my development workflow, and in any event does not allow me to get Renoise’s responses back in to Emacs.

I have tried using Renoise’s remote debugging facilities, which kind of works, but the debugger freezes Renoise when it’s used, which prevents the interaction with Renoise that I find necessary for developing my script.

I have also tried the jeejah repl, but I am unable to get Renoise to allow me to interact with it while the repl is running either, as it just keeps asking me whether I want to interrupt the script. Besides, I’m not even sure jeejah works at all as a repl, since I didn’t even get far enough to bother trying to connect Emacs to it, which is the only way to test if it works.

Does anyone know of another working alternative or whether this is possible to do in Renoise at all?

2 Likes

Off the top of my head, never tried this, but I’m pretty sure there is a built-in OSC handler to eval Lua code.

Don’t know if the results are available to be sent back.

But plausibly you (or someone) could write a REPL that sent out OSC messages and (ideally) listened for a reply and displayed it.

https://tutorials.renoise.com/wiki/Open_Sound_Control

1 Like

Ugh. Yes. I want to do the same thing. I want to use it to power completion/introspection for my language server in Vim.

Do y’all think that the OSC handler or sockets would be a better way to communicate with Renoise?