[PD-dev] midi clock support under NT

Daniel Heckenberg daniel at bogusfront.org
Mon Jun 17 14:54:23 CEST 2002


Hi all,

After discovering that the midiclkin and midirealtimein objects do not work
properly under 34.4 or 35.test26,
I had a look through the code and discovered that it only requires a couple
of small changes to get it going and perhaps some #ifdefs to make it behave
on the other platforms.

It seems strange: all of the code is there except the correct dispatch
call... perhaps there's a reason for this?

changes are:
s_unix.c around line 300 (ver 0.35test26)
in function sys_dispatchnextmidiin

...
if (byte == 0xf8)
{
	inmidi_clk(midi_inqueue[midi_intail].q_time);
} else if (byte > 0xf8)
{
    	inmidi_realtimein(portno, byte);
}
...

oh, and the second atom needs to be included in the pd_list call in the
realtimein object:

x_midi.c around line 645:

void inmidi_realtimein(int portno, int SysMsg)
{
    if (midirealtimein_sym->s_thing)
    {
    	t_atom at[2];
    	SETFLOAT(at, portno);
    	SETFLOAT(at+1, SysMsg);
    	pd_list(midirealtimein_sym->s_thing, &s_list, 2, at);	<--- change is
here
    }
}

Daniel





More information about the Pd-dev mailing list