-
Chalisque
I'm asking this here because what I'd like to do is something that pd does, so I suspect people here might know the answer. That is, you can have objects like delay that delay a bang or message. I'd like to, at first just for personal interest and pedagogical value, write a simple patcher-like system for managing the flow of events. I've tried to read some of the source code, but the size of it is overwhelming without some advice as to where in the source to read, and some idea of how pd is structured internally.
So suppose I wanted to write a pd-very-lite with no audio, just messages. The only objects would be 'bang', 'delay' and some kind of output (e.g. sending a midi CC or something). What sort of code do you have to write to get a reliable ms delay of an event?
More generally, again pedagogical value for now, how does one sequence midi events, or events in general, either when there is an audio thread to sync to, or without.
-
Chalisque
In Max/MSP, you can set a message's content by sending it to the right inlet. In pd, at present, [prepend set] and sending that to the left inlet works, but the console warns that [prepend] is considered deprecated, and that one should use [list prepend] instead. Then you have to use [list trim] to remove the 'list' from the start.
If a pd user wants to store a message, and then send it with a bang, in Max/MSP this is done via a single object. With pd, and with prepend being deprecated, and list requiring trim, what can be done easily with a single message in Max/MSP now requires a message and two objects, and wiring them together.
Is there some reason why storing and forwarding messages this way is considered bad practice? And what should I be doing? (I'm porting some Max patches to pd at the moment.)
And out of curiosity, how hard would it be to modify pd so that messages have a right inlet which functions as a shortcut for ([list prepend set] -> [list trim] -> first inlet of message)?