hi,
how best to define a ``control event'' in Pd?
I am trying to put 'cycle' into cyclone now. I need to know, how to sense, that successive messages belong to the same event. This `event-sensitive' mode is so described in the max4 manual:
``cycle detects separate events and restarts at the leftmost outlet when a new event occurs. Examples of separate events include messages with delays between them, and messages triggered by successive mouse clicks or MIDI events. A stream of items separated by commas in a message box is considered a single event.''
In a preliminary version I have simply used clock_getlogicaltime(), comparing logical times, but to handle it properly, one probably needs to distinguish between separate clocks or midi data tagged with the same time stamp, and also between different bits of data coming through sockets at the same time, like mouse, keyboard and net.
In the Pd scheduler I found a call, outlet_setstacklim(), which seems to be invoked before processing almost any new `event' (except midi -- wonder why?). At least this is my understanding of the actual meaning of an `event'. But this call's sole job is to set a mark used in preventing recursive patches from overflowing the stack.
Is there any way in which an external might get a clue?
Krzysztof
Hi Krzysztof,
There's no way to get an "event number" but there should be... I'm trying to stop adding things to PD 0.35 and just get it all working at the same time, but the fix is probably just to increment an integer every time outlet_setstacklim() gets called.
MIDI input should indeed call outlet_setstacklim(), it's a bug if it doesn't which I'll go fix...
cheers Miller
On Fri, May 31, 2002 at 12:43:12PM +0200, Krzysztof Czaja wrote:
hi,
how best to define a ``control event'' in Pd?
I am trying to put 'cycle' into cyclone now. I need to know, how to sense, that successive messages belong to the same event. This `event-sensitive' mode is so described in the max4 manual:
``cycle detects separate events and restarts at the leftmost outlet when a new event occurs. Examples of separate events include messages with delays between them, and messages triggered by successive mouse clicks or MIDI events. A stream of items separated by commas in a message box is considered a single event.''
In a preliminary version I have simply used clock_getlogicaltime(), comparing logical times, but to handle it properly, one probably needs to distinguish between separate clocks or midi data tagged with the same time stamp, and also between different bits of data coming through sockets at the same time, like mouse, keyboard and net.
In the Pd scheduler I found a call, outlet_setstacklim(), which seems to be invoked before processing almost any new `event' (except midi -- wonder why?). At least this is my understanding of the actual meaning of an `event'. But this call's sole job is to set a mark used in preventing recursive patches from overflowing the stack.
Is there any way in which an external might get a clue?
Krzysztof
PD-dev mailing list PD-dev@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-dev