Csound Csound-dev Csound-tekno Search About

Lua error

Date2017-02-10 16:28
FromGleb
SubjectLua error
Hi everybody!

I am trying to run examples of Lua opcodes. i.e. lua_ikopcall and others.
All of them return 
attempt to call a nil value. 

Any help appreciated.
Thanks!



-----
Gleb Rogozinsky, PhD
Associated Professor
Interactive Arts Department
Saint-Petersburg University of Film and Television

Deputy Director of Medialab
Saint-Petersburg University of Telecommunications
--
View this message in context: http://csound.1045644.n5.nabble.com/Csnd-Lua-error-tp5754433.html
Sent from the Csound - General mailing list archive at Nabble.com.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-02-10 17:03
FromMichael Gogins
SubjectRe: Lua error
I just built Csound from Git develop head on Ubuntu 16.04 and the Lua
opcodes work fine.

Things to check:

-- Make sure that you have built and installed LuaJIT 2.0.4.
-- Make sure that your LuaJIT is built for 64 bit CPU architecture
(I'm assuming Csound is) like this:

mkg@Sun-Yukong:~/csound$ file /usr/local/bin/luajit-2.0.4
/usr/local/bin/luajit-2.0.4: ELF 64-bit LSB executable, x86-64,
version 1 (SYSV), dynamically linked, interpreter
/lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24,
BuildID[sha1]=e07d14d33b446faeacfc4056e10b95f257e2c6fa, stripped

-- Make sure that you see something for LuaJIT when you run ldd on
libLuaCsound.so, like this:

mkg@Sun-Yukong:~/csound$ ldd libLuaCsound.so
linux-vdso.so.1 =>  (0x00007ffd14177000)
libluajit-5.1.so.2 => /usr/local/lib/libluajit-5.1.so.2 (0x00007f9de7443000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f9de7096000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9de6e7f000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9de6c62000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9de6899000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9de658f000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9de638b000)
/lib64/ld-linux-x86-64.so.2 (0x00005623a23cb000)

If you don't, make sure that the libluajit-5.1.so.2 is in ldconfig or
in LD_LIBRARY_PATH.

-- You could try setting LUA_PATH and LUA_CPATH environment variables
according to Lua FAQ here: http://www.luafaq.org/.

Send me a csd or Lua file that reproduces your problem and I will try
to debug it.

Best,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Feb 10, 2017 at 11:28 AM, Gleb  wrote:
> Hi everybody!
>
> I am trying to run examples of Lua opcodes. i.e. lua_ikopcall and others.
> All of them return
> attempt to call a nil value.
>
> Any help appreciated.
> Thanks!
>
>
>
> -----
> Gleb Rogozinsky, PhD
> Associated Professor
> Interactive Arts Department
> Saint-Petersburg University of Film and Television
>
> Deputy Director of Medialab
> Saint-Petersburg University of Telecommunications
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Csnd-Lua-error-tp5754433.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-02-10 18:12
FromGleb
SubjectRe: Lua error
Thank you, Michael! 

The test examples are running OK now. Please check your mailbox.
 



-----
Gleb Rogozinsky, PhD
Associated Professor
Interactive Arts Department
Saint-Petersburg University of Film and Television

Deputy Director of Medialab
Saint-Petersburg University of Telecommunications
--
View this message in context: http://csound.1045644.n5.nabble.com/Csnd-Lua-error-tp5754433p5754436.html
Sent from the Csound - General mailing list archive at Nabble.com.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-02-10 20:25
FromMichael Gogins
SubjectRe: Lua error
Attachmentsgleb_lua.csd  
The attached csd, based on your orc and sco example, works fine. Changes:

-- Fixed typo "csoundLibrary.csoundGetKsmps" to
"csoundApi.csoundGetKsmps." You crashed because csoundLibrary was
undefined.
-- Changed krate kOut and kIn to arate aOut and aIn. You would have
crashed because kOut had one slot but you are indexing ksmps slots.
-- Put in a simple oscillator for aIn to visibly display the inversion
of the signal.

Best,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Feb 10, 2017 at 1:12 PM, Gleb  wrote:
> Thank you, Michael!
>
> The test examples are running OK now. Please check your mailbox.
>
>
>
>
> -----
> Gleb Rogozinsky, PhD
> Associated Professor
> Interactive Arts Department
> Saint-Petersburg University of Film and Television
>
> Deputy Director of Medialab
> Saint-Petersburg University of Telecommunications
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Csnd-Lua-error-tp5754433p5754436.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here