atom feed20 messages in at.iem.pd-listRe: [PD] pdlua output
FromSent OnAttachments
robcanningJan 18, 2008 3:57 am 
Frank BarknechtJan 18, 2008 9:09 am 
robcanningJan 19, 2008 1:22 am 
IOhannes m zmoelnigJan 19, 2008 1:45 am 
Frank BarknechtJan 19, 2008 3:18 am.pd, .lua
robcanningJan 19, 2008 5:20 am 
robcanningJan 19, 2008 5:24 am 
robcanningJan 22, 2008 5:52 am 
robcanningJan 22, 2008 8:32 am.lua
robcanningJan 23, 2008 6:40 am 
Frank BarknechtJan 23, 2008 1:30 pm.lua
robcanningJan 30, 2008 7:23 am 
Claude Heiland-AllenJan 30, 2008 7:53 am 
Frank BarknechtJan 30, 2008 8:30 am 
Frank BarknechtJan 30, 2008 10:03 am 
Frank BarknechtJan 30, 2008 12:43 pm 
Claude Heiland-AllenJan 30, 2008 1:40 pm 
Frank BarknechtJan 30, 2008 11:09 pm 
Claude Heiland-AllenJan 31, 2008 6:36 am 
Frank BarknechtJan 31, 2008 7:32 am 
Subject:Re: [PD] pdlua output
From:Frank Barknecht (fb@footils.org)
Date:Jan 30, 2008 12:43:20 pm
List:at.iem.pd-list

Hallo, Claude Heiland-Allen hat gesagt: // Claude Heiland-Allen wrote:

Something like:

-- called when "greaterthan" message is received at first inlet -- atoms is a table of the atoms in the message following the selector function M:in_1_greaterthan(atoms) local name = atoms[1] -- could be: "score" local value = atoms[2] -- could be: 3 if name ~= nil and value ~= nil then -- could check types too.. -- do your stuff here end end

If you have a range of possible selectors, and don't want to have to write a method for all of them, you can use:

function M:in_1(selector, atoms) ... end

Then selector will be "greaterthan" (or whatever) and atoms will be as above.

One thing I wanted to ask here: Is there a special reason that pdlua isn't using the (new in 5.1) vararg syntax with "..." for methods and maybe also in outlet(...) or similar places? Then it would be possible to just do self:outlet(outnum, sel, a, b, c) instead of having to pack it first like self:outlet(outnum, sel, {a,b,c}). And for things like bang-output, it could be even simpler: self:outlet(outnum, "bang") instead of: self:outlet(outnum, "bang", {})

Ciao