[Csnd] Csound6 and Lua
Date | 2013-06-01 09:51 |
From | francesco |
Subject | [Csnd] Csound6 and Lua |
Hello All, i have a little problem ... csoundCreate () take a argument void*; i see in Python You can use None. But in Lua i'm having trouble. What can i use? Lua has nil or false but nil appears as nothing (expected 1 arg in function), while false is a boolean value and then not accepted, i.e like any other value give me: Error in csoundCreate (arg 1), expected 'void *' got 'number' (or else) Someone has an idea? Thanks, ciao, francesco. -- View this message in context: http://csound.1045644.n5.nabble.com/Csound6-and-Lua-tp5724127.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2013-06-01 10:00 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Csound6 and Lua |
What about using the Csound class instead? There is a constructor that does not take any parameters. In Python it would be cs = csnd.Csound() On 1 Jun 2013, at 09:51, francesco wrote: > Hello All, > i have a little problem ... > csoundCreate () take a argument void*; i see in Python You can use None. > But in Lua i'm having trouble. What can i use? > Lua has nil or false but nil appears as nothing (expected 1 arg in > function), > while false is a boolean value and then not accepted, i.e like any other > value > give me: > > Error in csoundCreate (arg 1), expected 'void *' got 'number' (or else) > > Someone has an idea? > > Thanks, > ciao, > francesco. > > > > > > -- > View this message in context: http://csound.1045644.n5.nabble.com/Csound6-and-Lua-tp5724127.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-06-01 10:20 |
From | francesco |
Subject | [Csnd] Re: Csound6 and Lua |
Ok, i have segmentation fault. So, i guess, some thing is wrong in my setup ... I will try exploring more. Thanks for now. PS: Only to be sure: is the Lua interface supposed to be ok? ciao, francesco. -- View this message in context: http://csound.1045644.n5.nabble.com/Csound6-and-Lua-tp5724127p5724129.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2013-06-01 13:12 |
From | Michael Gogins |
Subject | Re: [Csnd] Re: Csound6 and Lua |
I've started looking into your problem. First, Csnd has become Csnd6. Second, it is supposed to work in Csound 6. However, it looks like the startPerformance method is not available. Probably it's not declared in csound.hpp. I don't have time to look at that now, but I will have time over the weekend. I expect this will be easy to fix.
In the meantime, if you are using LuaJIT, you can still definitely create and call Csound directly from Lua. See the examples/lua/csound_ffi.lua example, which works for me. The difference between the Lua interface and the FFI interface is that the Lua interface uses SWIG to generate Lua wrappers for C++ code, whereas LuaJIT's FFI module enables Lua all by itself to do the same thing, only at run time and without SWIG.
Hope this helps, Mike On Sat, Jun 1, 2013 at 5:20 AM, francesco <ilterzouomo@fastwebnet.it> wrote: Ok, i have segmentation fault. Michael Gogins Irreducible Productions http://www.michael-gogins.com Michael dot Gogins at gmail dot com |
Date | 2013-06-01 14:17 |
From | francesco |
Subject | [Csnd] Re: Csound6 and Lua |
Thanks. I have a pc with 2 ubuntu os (yes, true!) on board and i have choose to install csound6 in one (UbuntuStudio 64, 12.10) and leave csound5 in the other (Ubuntu 12.04, 32bit). Now seems all is ok. Probably it was some confusion with globally installed Csound5 and Csound6 running in his build directory. I will try to explore in the next days. For now simple examples in Csound6 are working right. Again thanks and sorry for the noise. ciao, francesco. -- View this message in context: http://csound.1045644.n5.nabble.com/Csound6-and-Lua-tp5724127p5724131.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2013-06-01 14:44 |
From | Michael Gogins |
Subject | Re: [Csnd] Re: Csound6 and Lua |
Not noise at all, I'm glad to help. On Jun 1, 2013 9:17 AM, "francesco" <ilterzouomo@fastwebnet.it> wrote:
Thanks. |
Date | 2013-06-01 17:49 |
From | Michael Gogins |
Subject | Re: [Csnd] Re: Csound6 and Lua |
Update: there is not a problem with the Lua wrapper at all. The name of this function in the wrapper is just Start. So, I added the line csound:Start()
just before creating the performance thread, and it works now. Regards, Mike On Sat, Jun 1, 2013 at 9:44 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
Michael Gogins Irreducible Productions http://www.michael-gogins.com Michael dot Gogins at gmail dot com |