This is a copy of the original VSTLua pages, which where located at http://t-zec.org/vstlua/ which seems to be gone. I've received the source code to V0.06 from here and created a slightly updated version from that, which uses the latest Lua and VST SDK versions, and cures some smaller bugs. Have fun!
I don't know whether the email address below that came with the VstLua package is still valid; if not, please use my one (office@hermannseibWASP.com minus the insect ;-) instead. I don't really want to appoint myself as the maintainer of this seemingly abandoned project, but don't want it do die either...
Hermann Seib, August 2010
On with the original text:
function midiEventCb(midiEvent) if midiEvent.type==midi.noteOn or midiEvent.type==midi.noteOff then local note = midiEvent.byte2 -- decide whether to transpose it up or down if note>=noteToNumber('C-5') then note = midiEvent.byte2 + interval.fifth else note = note - interval.fifth end midiEvent.byte2=note end sendMidi(midiEvent) endSee the API for details.
numInputs=0 numOutput=0 isSynth=1before it'll show up as a midi unit. Secondly, it is a stupendous pain to load MIDI plugins in some programs. The ToneSpace manual has a good guide for setting up MIDI plugins in all of these hosts. Just read vstlua.dll for tonespace.dll.
* Copyright (c) 2007, John Williamson * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the
nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.**
Ver 0.06 SysEx support (not very useful atm, as virtually no hosts support VST sysex, except for VSTHost). Infinite loop trapping added. Persistent storage of data between sessions (read and write from the table called "persistence"). 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. (thanks for the idea austinfx!) --- Changes by H.Seib: VST SDK 2.4.2 / Lua 5.1.4 usage Updated VS2005 build environment suspend/resume turn off/on background operations Ver 0.05 GUI resizing. Bug fixes. Better docs. Key handling. Drag-n-drop support. Vu meters. GUI bitmaps can be overriden by user. More complex microtuning example script. Ver 0.04 Many more scripts Some bugs fixed, especially when loading multiple instances custom GUI changed (again) Ver 0.03 Better script organization. Less crashing (again). Full OSC support. Ver 0.02 shinier gui gui component sizes are passed to controls xypad added text control added file selector added now threadsafe! menus can be hierarchical simple scheduler added (see init.lua) less crashing fixed midi out not showing in eXT added getCycle and getBarStart functions added saveProgramCb and loadProgramCb functions when just before/just after programs changed compiled in luasockets so network access is possible (maybe we will see OSC sometime soon :) ) code cleaned up, windows specific stuff moved to separate file as far as possible, other stuff ifdef'd appropriately photoshop file for the gui is now in the source distribution