| Hello,
not an answer but You can use the Csound API in Lua/LuaJIT using
require "luaCsnd6"
and the CsoundAC API with
require "luaCsoundAC" (if i'm correct).
This is the simplest way to use Csound in Lua/LuaJIT, i guess.
But maybe You already know that and need something different.
Anyway, if matter below is a simple example for Python by Mr. Lazzarini
translated for Lua
ciao,
francesco.
require "luaCsnd6"
cs = luaCsnd6.Csound()
cs:SetOption("-+rtaudio=alsa")
cs:SetOption("--nchnls=2")
cs:SetOption("-d")
cs:SetOption("-odac")
cs:Start()
perf = luaCsnd6.CsoundPerformanceThread(cs)
perf:Play()
for i=1, 10 do
cs:CompileOrc([[
event_i "i", 1, 0, 1, 5000, 500
event_i "i", 1, 0.25, 1, 5000, 500
instr 1
k1 expon 1, p3, 0.001
a2 oscili k1*p4, p5,-1
outs a2, a2
endin
]])
luaCsnd6.csoundSleep(500)
end
perf:Stop()
--
View this message in context: http://csound.1045644.n5.nabble.com/Scope-of-csoundApi-variable-in-Lua-tp5725736p5725737.html
Sent from the Csound - General mailing list archive at Nabble.com.
|