VST LUA beta -- midi scripting VST
-
- KVRian
- 514 posts since 2 May, 2004
Opened...testing
It worked nice when I tested midilooper. after that I tried arpeg.lua. Red error occured:
"onframe callback failed...arpeg attempt to call globalnextQbeat a nil value"
I tried to load something else but energy1.4 crashed.
If I try to reload vstlua without restarting energy the red message says:
on frame callback failed. timing lua 4 . attempt to call field "noteOn" (number value)
after that no script will load.
N.B The arpeg did not work with previous version too.
It worked nice when I tested midilooper. after that I tried arpeg.lua. Red error occured:
"onframe callback failed...arpeg attempt to call globalnextQbeat a nil value"
I tried to load something else but energy1.4 crashed.
If I try to reload vstlua without restarting energy the red message says:
on frame callback failed. timing lua 4 . attempt to call field "noteOn" (number value)
after that no script will load.
N.B The arpeg did not work with previous version too.
Last edited by maki on Mon Dec 03, 2007 8:27 am, edited 1 time in total.
-
- KVRist
- Topic Starter
- 50 posts since 30 Mar, 2006 from Glasgow, UK
maki, you should find a file called log.txt created in the same directory as vstlua.dll; can you cause the problem to happen, then paste the contents of that file here?
-
- KVRian
- 514 posts since 2 May, 2004
--== VstLua 0.06 / tzec 2007 ==--
--== VstLua 0.06 / tzec 2007 ==--
--== VstLua 0.06 / tzec 2007 ==--
FATAL ERROR: onFrame callback failed:C:\Program Files\vst\vstlua-0.05\scripts\arpeg.lua:61: attempt to call global 'computeNextQBeat' (a nil value)
--== VstLua 0.06 / tzec 2007 ==--
--== VstLua 0.06 / tzec 2007 ==--
FATAL ERROR: onFrame callback failed:C:\Program Files\vst\vstlua-0.05\scripts\arpeg.lua:61: attempt to call global 'computeNextQBeat' (a nil value)
-
- KVRist
- Topic Starter
- 50 posts since 30 Mar, 2006 from Glasgow, UK
Hmmm, weird. I do notice you're loading a file from the 0.05 directory, it might be worth doing a clean install in a new directory. It seems to be OK with eXT here, but maybe there's a problem loading the init scripts on your system.
- KVRAF
- 8406 posts since 2 Aug, 2005 from Guitar Land, USA
The latest version doesn't show up in Reaper.
The only site for experimental amp sim freeware & MIDI FX: http://runbeerrun.blogspot.com
https://m.youtube.com/channel/UCprNcvVH6aPTehLv8J5xokA -Youtube jams
https://m.youtube.com/channel/UCprNcvVH6aPTehLv8J5xokA -Youtube jams
-
- KVRist
- 487 posts since 19 Jan, 2003
Doesn't seem to show up in SX3 either, shows as unable to load in plugin information.
I tried modifying the config file to match the settings from the previous version (2i/o isSynth 0) but still no luck.
I tried modifying the config file to match the settings from the previous version (2i/o isSynth 0) but still no luck.
-
- KVRian
- 1239 posts since 17 Jul, 2003
In Cubase it's probably better to set numin = 0, numout = 2 and is synth = 1contrast wrote:Doesn't seem to show up in SX3 either, shows as unable to load in plugin information.
I tried modifying the config file to match the settings from the previous version (2i/o isSynth 0) but still no luck.
If you set numout to 0, process/processreplacing is never called.
I had a problem in C4 with a previous version of vstlua and I had to edit the Vst2xBlacklist.xml file.
And don't forget to put sdl.dll in your ..\WINDOWS\system32 folder.
-
- KVRist
- 487 posts since 19 Jan, 2003
Hurr, it's fixed now. I actually tried these last night but it still wasn't working. I didn't reboot after putting sdl.dll in the system32 folder though. So thanks for reminding me about that, because I accidentally left my DAW on overnight, and would probably not have thought to reboot it if you hadn't.mbncp wrote:In Cubase it's probably better to set numin = 0, numout = 2 and is synth = 1
If you set numout to 0, process/processreplacing is never called.
And don't forget to put sdl.dll in your ..\WINDOWS\system32 folder.
- KVRAF
- 8406 posts since 2 Aug, 2005 from Guitar Land, USA
I got it working now too, in Reaper. Did the dll to system32, restart, and modify config to take out the spaces. Wrote it down in a text file so I'll remember. The older versions mostly worked in Reaper.
Edit:Ornament is awesome, I don't know exactly what it did but it sounded like 2 notes blended together. I'll get into the scripts soon as I have time.
Edit:Ornament is awesome, I don't know exactly what it did but it sounded like 2 notes blended together. I'll get into the scripts soon as I have time.
The only site for experimental amp sim freeware & MIDI FX: http://runbeerrun.blogspot.com
https://m.youtube.com/channel/UCprNcvVH6aPTehLv8J5xokA -Youtube jams
https://m.youtube.com/channel/UCprNcvVH6aPTehLv8J5xokA -Youtube jams
-
- KVRer
- 5 posts since 8 Jul, 2006
Hey all,
cool stuff.
any quick pointers on if/how its possible to tell if the host starts and stops.
Trying to make OSC clock sync for [ VST host -> reaktor standalone ] its a simple midiclock thing in this form
__BPM/ bpmvalue
__REALTIME/ midiclockvalue: 248,250,251,252( 0xF8, 0xFA, 0xFB, 0xFC )
cheers and thanks for this gem btw.
cool stuff.
any quick pointers on if/how its possible to tell if the host starts and stops.
Trying to make OSC clock sync for [ VST host -> reaktor standalone ] its a simple midiclock thing in this form
__BPM/ bpmvalue
__REALTIME/ midiclockvalue: 248,250,251,252( 0xF8, 0xFA, 0xFB, 0xFC )
cheers and thanks for this gem btw.
-
- KVRer
- 5 posts since 8 Jul, 2006
aha. to answer my own Q, obviously i can extract it all from getHostTime()..
-
- KVRist
- Topic Starter
- 50 posts since 30 Mar, 2006 from Glasgow, UK
Dennis, you can tell if the host is playing by whether or not the onFrameCb() callback gets called (it won't if it's not playing). You can also call getHostTime() and check if the "playing" field is 0 or 1.
EDIT: saw you worked it out!
EDIT: saw you worked it out!
-
- KVRer
- 5 posts since 8 Jul, 2006
thanks for the reply..
to me it looks like onFrame callback is called whether stopped or not ( Live:vstlua .05 EnergyXT:vstlua .06 ), but mind you this is my first encounter with LUA so i could be wrong.
following:
prints both when stopped or started and aVar is updated accordingly. But its all good cause if it wherent it would be harder to make the logic for MIDI start, stop, reset.
to me it looks like onFrame callback is called whether stopped or not ( Live:vstlua .05 EnergyXT:vstlua .06 ), but mind you this is my first encounter with LUA so i could be wrong.
following:
Code: Select all
aVar = 0
function onFrameCb()
aVar = aVar + 1
hosttime = getHostTime()
vprint( "PLAYING: " .. hosttime.playing .. "\n" )
vprint( "ppqPos: " .. hosttime.ppqPos .. "\n" )
vprint( "a Var: " .. aVar .. "\n" )
end
-
- KVRian
- 514 posts since 2 May, 2004
I have been trying to learn some timing issues in Vstlua but no results so far.for instance, even a simple example on Quikcstart page
function onFrameCb()
--send middle C at max velocity every frame
ev = midi.noteOn(60, 127, 0)
sendMidi(ev)
end
does not work at all. If I run it as onframe.lua script I get a red message and logfile shows following:
--== VstLua 0.06 / tzec 2007 ==--
--== VstLua 0.06 / tzec 2007 ==--
--== VstLua 0.06 / tzec 2007 ==--
FATAL ERROR: onFrame callback failed:C:\Program Files\vst\vstlua-0.06\scripts\onframe.lua:4: attempt to call field 'noteOn' (a number value)
With the second script
function onFrameCb()
hosttime = getHostTime()
--compute the beat properties
beatlen,number,timetobeat = computeBeatTime(hosttime.samplePos, hosttime.tempo, hosttime.sampleRate, 0.25)
--will this note be played in this frame?
if timetobeat < VSTFrameLength then
--middle C at max veloctiy
ev = midi.noteOn(60, 127, 0)
--set the delta to the exact time to the beat
ev.delta = timetobeat
sendMidi(ev)
end
end
I get this
--== VstLua 0.06 / tzec 2007 ==--
--== VstLua 0.06 / tzec 2007 ==--
--== VstLua 0.06 / tzec 2007 ==--
FATAL ERROR: onFrame callback failed:C:\Program Files\vst\vstlua-0.06\scripts\onframe.lua:4: attempt to call field 'noteOn' (a number value)
--== VstLua 0.06 / tzec 2007 ==--
--== VstLua 0.06 / tzec 2007 ==--
FATAL ERROR: onFrame callback failed:C:\Program Files\vst\vstlua-0.06\scripts\onframe.lua:10: attempt to call field 'noteOn' (a number value)
--== VstLua 0.06 / tzec 2007 ==--
FATAL ERROR: onFrame callback failed:C:\Program Files\vst\vstlua-0.06\scripts\onframe.lua:10: attempt to call field 'noteOn' (a number value)
function onFrameCb()
--send middle C at max velocity every frame
ev = midi.noteOn(60, 127, 0)
sendMidi(ev)
end
does not work at all. If I run it as onframe.lua script I get a red message and logfile shows following:
--== VstLua 0.06 / tzec 2007 ==--
--== VstLua 0.06 / tzec 2007 ==--
--== VstLua 0.06 / tzec 2007 ==--
FATAL ERROR: onFrame callback failed:C:\Program Files\vst\vstlua-0.06\scripts\onframe.lua:4: attempt to call field 'noteOn' (a number value)
With the second script
function onFrameCb()
hosttime = getHostTime()
--compute the beat properties
beatlen,number,timetobeat = computeBeatTime(hosttime.samplePos, hosttime.tempo, hosttime.sampleRate, 0.25)
--will this note be played in this frame?
if timetobeat < VSTFrameLength then
--middle C at max veloctiy
ev = midi.noteOn(60, 127, 0)
--set the delta to the exact time to the beat
ev.delta = timetobeat
sendMidi(ev)
end
end
I get this
--== VstLua 0.06 / tzec 2007 ==--
--== VstLua 0.06 / tzec 2007 ==--
--== VstLua 0.06 / tzec 2007 ==--
FATAL ERROR: onFrame callback failed:C:\Program Files\vst\vstlua-0.06\scripts\onframe.lua:4: attempt to call field 'noteOn' (a number value)
--== VstLua 0.06 / tzec 2007 ==--
--== VstLua 0.06 / tzec 2007 ==--
FATAL ERROR: onFrame callback failed:C:\Program Files\vst\vstlua-0.06\scripts\onframe.lua:10: attempt to call field 'noteOn' (a number value)
--== VstLua 0.06 / tzec 2007 ==--
FATAL ERROR: onFrame callback failed:C:\Program Files\vst\vstlua-0.06\scripts\onframe.lua:10: attempt to call field 'noteOn' (a number value)