1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
local lpaths = pd.Class:new():register("lpaths")
function lpaths:initialize(name, atoms)
self.inlets = 1
self.outlets = 1
return true
end
function lpaths:in_1_loadx(atoms)
local fname = self._loadpath .. "hello.txt"
local f = assert(io.open(fname, "rb"))
local content = f:read("*all")
f:close()
pd.post(content)
return true
end
function lpaths:in_1_load(atoms)
local fname = self._canvaspath .. "hello.txt"
local f = assert(io.open(fname, "rb"))
local content = f:read("*all")
f:close()
pd.post(content)
return true
end
function lpaths:in_1_postpath(atoms)
pd.post("self._canvaspath: " .. self._canvaspath)
end
function lpaths:in_1_postpathx(atoms)
pd.post("self._loadpath: " .. self._loadpath)
end
|