Protoplug

It’s possible also to turn JS plugs into VST. It’s not fully developed yet but there’s a program called Geep Jeez. Guy who’s developing it is taking a break, but he got really far and I’ve successfully exported some JS synth controllers I made as VST. Really you usually won’t need to, you can just load the script in ReaJS in any VST host.

Major drawback of JS is doing the GUI stuff, it’s truly a bitch, but if you don’t all you get is a long list of sliders that can run off the screen if there are too many, but there are tools out there for GUI stuff too (and Geep Jeez makes it possible to use VSTGUI and such). And you can just lift stuff from other JS scripts with good GUI elements (that’s what I do).

There’s also a graphical “modular” JS editor here: http://jsfxgen.googlecode.com/svn/trunk/bin/index.html (and a standalone application of the same). It’s been pretty reliable when I’ve used it, but you may need to vet the code it outputs a little bit. It’s aging and the guy who made it hasn’t updated it for more recent versions of JS.

JS is really pretty capable and will likely get better. I recommend it, there are some bloody good FX written in it and the beauty is you can totally customize them.

Edit: forgot to mention, even better (well, easier) than VSTGUI is SWIPE GUI, which is also usable with Geep and is very effective.

I think you could use the luajit “ffi” module in protoplug to draft code and data types as pure C code wrapped inside lua. “FFI” seems to be a luajit speciality. In the expamples that come with proto you’ll see quite some use of it for defining data objects. This way you can not only access C-style-buffers and floats (lua will have every number as double, and every structured data types as huge dynamic table…) but can also have code snippets written directly in C. I think it works this way, haven’t delved deeper into it yet. The beauty is of course to have relevant algorithms fixed down in C while pushing the framework and gui around in rad style in lua, or draft and tune algos in lua and then later fix them down to C for speed reasons or to transfer them to a C project.

It doesn’t sound that bad to me after all. And: this tool is for experimenting or quickly doing unusual stuff, not for building professional grade plugins. To me Lua plus ffi seems to fit just in when it comes to a simple scripting language with enough power. And lua is really simple - if you know how to program in another language, you’ll be supprised after a while, there’s nothing fancy to it and syntax is minimalistic instead of complex.

Hm, but protoplug is surprisingly fast here! Almost like a normal fx. And somehow you can extend with lua libs (no clue about it), that assumingly can be compiled c++?

Yes, as I’ve written, with luajit you can “ffi” plain c code directly into your work (dunno how well the luajit compiler will do ob it), and you can also interface binary libraries for outsourced routines. You can see how its done (libraries) in the examples using the fftw3 library for calculating fft’s. Protoplug has its own one-liner syntax extension to loading libraries, presumably to allow the same code working on mac/win/linux without too much extra stuff. Of course you can load your own binary libraries this way.

But I don’t know how you define performance, yea, it is quite fast, but not even close to what a good c/c++ compiler can do inlining stuff together massively, using sse accelleration, unrolling vectorization and shit. Well - fast enough for prototyping and having quick fun with ideas. When a simple effect uses 4%cpu instead of 1% it is still very usable, that is.

WOW! This is PERFECT!

THANKS!!!

Split midi input / one track notes to multiple instruments using protoplug VSTi / Panning by note -> VSTi instance

Hi, since Renoise 3.1 doesn’t seem to be capable to split midi to multiple tracks/instruments, I made a little script with protoplug. You can split one midi input / the notes of one track to multiple instruments with it, see example song below. It will transpose each n note to n*split_range (e.g. 24).

Very helpful for me, maybe for you, too. I can do this marvelous note auto panning for example, even with VSTis that do not support panning.

midi split by notes followup

[SPOILER]

--[[
name: midi split followup v0.1
author: J.R.
--]]

require "include/protoplug"

-- what kind of chord ?
local noteoffs = {}
local blockEvents = {}
local cNotes = 0
local numInstrs = 2
local splitRange = 24

function plugin.processBlock(samples, smax, midiBuf)
	blockEvents = {}
	-- analyse midi buffer and prepare a chord for each note
	for ev in midiBuf:eachEvent() do
		if ev:isNoteOn() then
			noteOff(ev)
			noteOn(ev)
			cNotes = (cNotes + 1) % (numInstrs)
		elseif ev:isNoteOff() then
			noteOff(ev)
		elseif ev:isPitchBend() then
			table.insert(blockEvents, midi.Event.pitchBend(ev:getChannel(), ev:getPitchBendValue()))
		elseif ev:isControl() then
			table.insert(blockEvents, midi.Event.control(ev:getChannel(), ev:getControlNumber(), ev:getControlValue()))
		end	
	end
	-- fill midi buffer with prepared notes
	midiBuf:clear() 
	if #blockEvents>0 then
		for _,e in ipairs(blockEvents) do
			midiBuf:addEvent(e)
		end
	end
end

function noteOn(root)
	noteoffs[root:getNote()] = root:getNote() + cNotes*splitRange
	local newEv = midi.Event.noteOn(
			root:getChannel(), 
			noteoffs[root:getNote()], 
			root:getVel())
	table.insert(blockEvents, newEv)
end 

function noteOff(root)
	if not noteoffs[root:getNote()] then return end
	local newEv = midi.Event.noteOff(
			root:getChannel(), 
			noteoffs[root:getNote()])
	table.insert(blockEvents, newEv)
	noteoffs[root:getNote()] = nil
end

params = plugin.manageParams {
    {
        name = "Num of instr.";
		type = "list";
		values = {2,3,4,5,6,7,8};
		default = 3;
        changed = function (val) numInstrs = val end;
    };
    {
        name = "Split range";
		type = "list";
		values = {12,24,36,48};
		default = 24;
        changed = function (val) splitRange = val end;
    };
}

[/SPOILER]

Example song:

http://tstlab.virtualcreations.de/renoise_forum/multiple_instr_note_followup.xrns

You needsynth1 VSTiand luaprotoplug VSTi. Also you need to setup a loopback driver in midi OSX settings or some loopback driver for windows:

post-5192-0-74303200-1446055958.png

Routing in example should be (could be not set, because of loopback driver device name):

instr 0: midi input your midi keyboard, midi routing to instrument 1

instr 1: midi input none, output midi loopback/iac driver

instr 2: midi input loopack/iac, midi ch.1, key c3-b4

instr 3: midi input loopack/iac, midi ch.1, key c5-b6

instr 3: midi input loopack/iac, midi ch.1, key c7++

Play on instr. 0, using the key range c-3 to b-4.

EDIT: fixed song link

EDIT 2: Added pitch bend and control data support!

1 Like

Protoplug finally is now 64bit on macos, since LuaJIT lib is now working on 64 bit:https://github.com/pac-dev/protoplug/releases