[Csnd] Csound6 Lua API: illegal gen number
| Date | 2013-08-30 14:47 |
| From | francesco |
| Subject | [Csnd] Csound6 Lua API: illegal gen number |
Hello All,
i'm doing this but i have illegal gen number error.
What i'm doing wrong?
Thanks,
ciao,
francesco.
PS: it is ok in Csound5.
require "luaCsnd6"
local ORC = [[
sr = 44100
ksmps = 1
nchnls = 2
0dbfs = 1
instr 1
iamp = p4
ifrq = cpsmidinn(p5)
ipos = 1
imass = 2
istiff = 3
idamp = 4
ivel = 5
a1 scantable iamp, ifrq, ipos, imass, istiff, idamp, ivel
a1 dcblock2 a1
outs a1, a1
endin
]]
local SCOH = [[
f1 0 128 10 1
f2 0 128 -7 1 128 1
f3 0 128 -7 50 64 100 64 0
f4 0 128 -7 1 128 1
f5 0 128 -7 0 128 0
]]
local SCO = [[
i 1 0 4 0.5 60
i 100 0 -1
]]
local cs = luaCsnd6.Csound()
local pt = luaCsnd6.CsoundPerformanceThread(cs)
cs:SetOption("-m0")
cs:SetOption("-d")
cs:SetOption("-odac")
cs:Start()
pt:Play()
cs:CompileOrc(ORC)
cs:ReadScore(SCOH)
cs:CompileOrc(ORC)
pt:Join()
--cs:Cleanup()
--
View this message in context: http://csound.1045644.n5.nabble.com/Csound6-Lua-API-illegal-gen-number-tp5727258.html
Sent from the Csound - General mailing list archive at Nabble.com.
|
| Date | 2013-08-30 16:32 |
| From | Michael Gogins |
| Subject | Re: [Csnd] Csound6 Lua API: illegal gen number |
| Attachments | test.lua |
You are not doing anything wrong. The attached version of your Lua script does work though. This implies there is some sort of a bug in the score parser. Hope this helps, Mike
=========================== Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Fri, Aug 30, 2013 at 9:47 AM, francesco <ilterzouomo@fastwebnet.it> wrote: Hello All, |
| Date | 2013-09-16 17:42 |
| From | Steven Yi |
| Subject | Re: [Cs-dev] [Csnd] Csound6 Lua API: illegal gen number |
| Attachments | test.py None None |
(Moving this thread to Csound-dev)
I took a look at this and something is certainly off. I rewrote the
example as a python script (attached) as that'll run with "gdb --args
python test.py" and debug alright. I did a breakpoint on hfgens and
found the EVTBLK looked suspicious, showing 6 pfields instead of 5 for
the first f1 statement:
Breakpoint 1, hfgens (csound=0x1008cc000, ftpp=0x101eacc50,
evtblkp=0x100964810, mode=0) at fgens.c:107
107 int nonpowof2_flag=0; /* gab: fixed for non-powoftwo function tables*/
(gdb) print *evtblkp
$5 = {
scnt = 0,
strarg = 0x0,
opcod = 102 'f',
pcnt = 6,
p2orig = 0.040362811791383332,
p3orig = 128,
p = {0, 1, 0.040362811791383221, 128, 128, 10, 1, 0 |
| Date | 2013-09-16 18:25 |
| From | Victor Lazzarini |
| Subject | Re: [Cs-dev] [Csnd] Csound6 Lua API: illegal gen number |
It could be something in the score preprocessor, as it does double up some p-fields at some point.
I had fixed that for i-statements, but maybe the same issue is happening with f-statements and causing
the trouble.
I could have a look, but this week is impossible for me, as I have lots of commitments and a trip at the weekend.
I might be able to follow this up next week, if it has not been fixed by then.
Victor
On 16 Sep 2013, at 17:42, Steven Yi wrote:
> (Moving this thread to Csound-dev)
>
> I took a look at this and something is certainly off. I rewrote the
> example as a python script (attached) as that'll run with "gdb --args
> python test.py" and debug alright. I did a breakpoint on hfgens and
> found the EVTBLK looked suspicious, showing 6 pfields instead of 5 for
> the first f1 statement:
>
> Breakpoint 1, hfgens (csound=0x1008cc000, ftpp=0x101eacc50,
> evtblkp=0x100964810, mode=0) at fgens.c:107
> 107 int nonpowof2_flag=0; /* gab: fixed for non-powoftwo function tables*/
> (gdb) print *evtblkp
> $5 = {
> scnt = 0,
> strarg = 0x0,
> opcod = 102 'f',
> pcnt = 6,
> p2orig = 0.040362811791383332,
> p3orig = 128,
> p = {0, 1, 0.040362811791383221, 128, 128, 10, 1, 0 |