aboutsummaryrefslogtreecommitdiff
path: root/examples/simplecounter.pd_luax
blob: 7b9f9e5e6e337e9c6b352bb8d4e7f8ba987e9bb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
return function (self, sel, atoms)
  self.inlets = 1
  self.outlets = 1
  self.count = 0
  if type(atoms[1]) == "number" then self.count = atoms[1] end
  function self:in_1_bang()
    self:outlet(1, "float", {self.count})
    self.count = self.count + 1
  end
  return true
end