agraef / pd-lua

Lua bindings for Pd, updated for Lua 5.3+
https://agraef.github.io/pd-lua/
GNU General Public License v2.0
47 stars 10 forks source link

multichannel support #53

Open ben-wes opened 1 week ago

ben-wes commented 1 week ago

and another discussion disguised as an issue. :)


it would be nice to have multichannel support for signals in pdlua. the (probably?) obvious way might be to have a table of tables in that case, where #in for perform(in) would tell the number of channels. but this is not backward compatible and possibly also not very efficient? ... although there could also be a new type like MC_SIGNAL for the inlets/outlets definitions.

another option might be to just have a flat table with all samples for all channels? the blocksize can be obtained through the dsp() function - so the number of channels could be derived in other ways (maybe also written somewhere from dsp() function?).

for outlets, the number of channels would need to be defined some way though, i guess ... not sure what the syntax there should be and what perform() should return.

agraef commented 1 week ago

I'm not sure what's the best way to do this. I still need to look into Pd's multi-channel implementation.