VST LUA beta -- midi scripting VST

VST, AU, AAX, CLAP, etc. Plugin Virtual Instruments Discussion
Post Reply New Topic
RELATED
PRODUCTS

Post

hello, can this VST LUA plugin re-harmonize incoming midinotes and chords to match another stream of notes ? Im using Flstudio 7 and i want to "force-match"
one pianroll to another. Also could VST LUA do generative rhythms ??

Post

Timbre wrote:hello, can this VST LUA plugin re-harmonize incoming midinotes and chords to match another stream of notes ? Im using Flstudio 7 and i want to "force-match"
one pianroll to another. Also could VST LUA do generative rhythms ??
I'm not sure what you mean by force-match? It could force things to a scale or key, and derive that from an incoming stream on another channel I suppose. I have a forcetoscale script, I've pasted it below, might give a starting point.

It can certainly do generative rhythms, see scripts/rhythmic.lua for the very simplest possible example.

Code: Select all

vprint("Force to scale. Choose scales in the GUI panel\n")
scale_list = {}

--get the lists of modes (these are defined in the init scripts)
for k,v in pairs(modes) do
    table.insert(scale_list, k)
end

--initialise
curscale = modes[scale_list[1]]

--create the gui
function openCb()  
   scalemenu = guiAddControl({x=20, y=90, type=GUITypes.menu,  label="Scale Types", menu = scale_list})
end


function midiEventCb(midiEvent)   
    --repitch incoming notes
    if midiEvent.type==midi.noteOn or midiEvent.type==midi.noteOff then
        note = midiEvent.byte2
        
        --de-octave
        note = note % 12
        octave = midiEvent.byte2 - note
        
        minNote = 100
        bestNote = note
        
        --find best matching note
        for i,v in ipairs(curscale) do
            n = v % 12            
            if math.abs(n-note)<minNote then
                minNote = math.abs(n-note)
               bestNote = n
            end
        end        
        
        --send back new note with right octave
        midiEvent.byte2 = bestNote + octave
        sendMidi(midiEvent)          
    end                               
end

--respond to gui events
function valueChangedCb(tag, value, text)     
    if tag==scalemenu then
        curscale = modes[scale_list[value+1]]                
    end
end



Post

tzec wrote: Contrast: does this happen with sending, or only with receiving? I only have receiving problems here.
I didn't have a chance to investigate that last night before I had to get some sleep, normally I always open them in pairs (one to and one from the osc device).

I'll check it out when I get home from work but I would guess it's the same on my end.

Post

Hello, VSTLUA crashes FLStudio 7.02 when using the "guitest" example script.
The crash happens when going to the GUI and clicking one of the buttons

Post

Timbre wrote:hello, can this VST LUA plugin re-harmonize incoming midinotes and chords to match another stream of notes ? Im using Flstudio 7 and i want to "force-match"
one pianroll to another. Also could VST LUA do generative rhythms ??
This exists already...
What we could use is a script where incoming midi notes coming from a midfile player or a looper get forced to chords played from the midi controller.

Post

contrast wrote: I'll check it out when I get home from work but I would guess it's the same on my end.
Yep, if I only open an outgoing device then there is no problem.

Post

Any word on when there might be a new version? :)

Post

Yes, I'll try and get one out this weekend. Network bug is fixed, along with many others. A few new features too; makes it a bit simpler to use.

Post

Awesome! Thanks again for the very helpful plugin.

Post

tzec wrote:Yes, I'll try and get one out this weekend. Network bug is fixed, along with many others. A few new features too; makes it a bit simpler to use.
Geat!
I have been trying to make some code. I realy need more help files or more lua scripts that actualy work. It would be perfect if examples had more comments. I assume that Vstlua should be used by many thousends of users ,not just those who are already very good in programming. More examples with comments would be enough for almost anybody who read "Beginning Programming For Dummies" and http://www.borg.com/~jglatt/tutr/miditutr.htm
http://lua-users.org/wiki/TutorialDirectory

How about simple midi buffer code or midi looper code?

Thanks gain for a great plugin!!!!!!

Post

0.06 is here. I expect the usual slew of bugs. It at least works in eXT, Reaper, saviHost, FL Studio 7 and Buzz here; I haven't tested Live.

http://t-zec.org/vstlua/vstlua-0.06.zip

New things:


The documentation now actually documents all the functions.
Many Lua extensions compiled in (bitwise operators, binary structs, better random numbers, true coroutines)
Networking works again.
SysEx support (not very useful atm, as virtually no hosts support VST sysex, except for VSTHost).
Infinite loop trapping added, along with partial execution support.
Persistent storage of data between sessions (either globally or inside presets)
Fast interprocess messaging via shared memory, so multiple instances of VstLua can talk with minimum latency.
setHostTime added (for Bidule users).
much simplified GUI access.
Easier to do midi mapping with the new addMidiFilter() function.
Console window, so commands can be run and executed immediately
Scripts are associated with presets (i.e. loading a preset loads the associated script too). (thanks for the idea austinfx!)



There's a midi looper script too, maki :) In fact, check out the script list at http://t-zec.org/vstlua/scripts.html
I'll try and add some simple, commented scripts so that people can get going with things.

Post

Only God knows how much I waited for this but an error message occurs when I open vstlua both in energy1.4 and 2.0. It refuses to open. Something like the module can not be found.

Post

Ah yes, I think I forgot the SDL dll. It's there now.

Post

I can se SDL.dll but still nothing :cry: :cry: :cry: :cry: :cry: :cry:

Post

Try to put sdl.dll in your ..\WINDOWS\system32 folder

Post Reply

Return to “Instruments”