monome / norns

norns is many sound instruments.
http://monome.org
GNU General Public License v3.0
633 stars 147 forks source link

error when passing sequins for duration in a timeline's loop #1693

Closed jaseknighter closed 1 year ago

jaseknighter commented 1 year ago

adding a sequins as a duration in a timeline loop results in an error:

/home/we/norns/lua/core/clock.lua:64: /home/we/norns/lua/lib/sequins.lua:127: attempt to index a number value (local 'self')
stack traceback:
    [C]: in function 'error'
    /home/we/norns/lua/core/clock.lua:64: in function 'core/clock.resume'

this can be reproduced in the "Thirty Second Song" example on the in the timeline reference by changing lines 24-27 of the example from:

two = tl.queue():loop{
    1.5, {send_note, root+9},
    0.75, {send_note, root+14},
}

to:

two = tl.queue():loop{
    s{1,1,3}, {send_note, root+9},
}

tested on version 230614

jaseknighter commented 1 year ago

gentle bumpety bump. <3

tlubke commented 1 year ago

@jaseknighter I was able to reproduce the issue with the "Thirty Second Song" example, and did some digging around. I initially thought it was a complex Lua meta table thing, but actually changing the module import line seems to fix it (don't know why).

timeline.lua, line-5 local s = sequins or require 'lib/sequins' -> local s = sequins or require 'sequins'

EDIT: Just tested -- your example actually works on the latest version of crow, so it's a norns only issue.

tehn commented 1 year ago

@dndrks quick fix!