Setup is as seen here:
www.imgur.com/Eza7x1a
Pastebin: dXNVvYF7
n = {}
n[1] = peripheral.wrap("left")
n[2] = peripheral.wrap("right")
n[3] = peripheral.wrap("back")
c = coroutine
il = {}
function notes()
print("a")
while true do
local i = c.yield() -- yeild up for info
table.insert(il,i[1])
local r = i
table.remove(r,1)
--print(textutils.serialize(r))
c.resume(l[r[1]],r) -- pass down refined info
--print(textutils.serialize(il))
local r = table.remove(il)
--print(r)
n[r].triggerNote() -- yeild up playing note
print("b")
c.resume(l[r[1]]) -- pass down continue
print("c")
end
print("d")
end
function res()
while true do
c.yeild()
end
end
l = {}
for itr=1,3 do
table.insert(l,c.create(notes))
c.resume(l[itr])
end
table.insert(l,c.create(res))
c.resume(l[1],{1,2,3,4})
print(c.status(l[1]))
c.resume(l[1])
print(c.status(l[1]))
sleep(.3)
c.resume(l[1],{1,2,3,4})
c.resume(l[1])
Any help would be greatly appreciated.EDIT: spelling