File: luasend.pd_lua

package info (click to toggle)
pd-lua 0.12.23%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,912 kB
  • sloc: ansic: 3,733; lisp: 66; makefile: 64
file content (13 lines) | stat: -rw-r--r-- 361 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
local luasend = pd.Class:new():register("luasend")

function luasend:initialize(sel, atoms)
   self.inlets = 1
   -- pass the receiver symbol as creation argument
   self.receiver = tostring(atoms[1])
   pd.post(string.format("luasend: receiver '%s'", self.receiver))
   return true
end

function luasend:in_1_bang()
   pd.send(self.receiver, "float", {1})
end