Cool! Thanks!
-----Original Message----- From: Miller Puckette [mailto:msp@ucsd.edu] Sent: Sunday, June 24, 2012 1:36 PM To: Ivica Ico Bukvic Cc: chris clepper; pd-list Subject: Re: [PD] nanoKontrol2 dropping MIDI messages (OSX)
Here's the relevant diff - should apply OK to 0.42 I think.
cheers Miller
diff --git a/src/s_midi_pm.c b/src/s_midi_pm.c index fe123ff..856f121
100644
--- a/src/s_midi_pm.c +++ b/src/s_midi_pm.c @@ -241,44 +241,51 @@ void nd_sysex_inword(int midiindev, int status, int data1, int data2, int data3)
void sys_poll_midi(void) {
- int i, nmess;
- int i, nmess, throttle = 100; PmEvent buffer; for (i = 0; i < mac_nmidiindev; i++) {
int nmess = Pm_Read(mac_midiindevlist[i], &buffer, 1);
if (nmess > 0)
while (1) {
int status = Pm_MessageStatus(buffer.message);
int data1 = Pm_MessageData1(buffer.message);
int data2 = Pm_MessageData2(buffer.message);
int data3 = ((buffer.message >> 24) & 0xFF);
int msgtype = (status >> 4) - 8;
switch (msgtype)
if (!throttle--)
goto overload;
nmess = Pm_Read(mac_midiindevlist[i], &buffer, 1);
if (nmess > 0) {
case 0:
case 1:
case 2:
case 3:
case 6:
sys_midibytein(i, status);
sys_midibytein(i, data1);
sys_midibytein(i, data2);
break;
case 4:
case 5:
sys_midibytein(i, status);
sys_midibytein(i, data1);
break;
case 7:
nd_sysex_mode=1;
nd_sysex_inword(i, status, data1, data2, data3);
break;
default:
if (nd_sysex_mode)
int status = Pm_MessageStatus(buffer.message);
int data1 = Pm_MessageData1(buffer.message);
int data2 = Pm_MessageData2(buffer.message);
int data3 = ((buffer.message >> 24) & 0xFF);
int msgtype = (status >> 4) - 8;
switch (msgtype)
{
case 0:
case 1:
case 2:
case 3:
case 6:
sys_midibytein(i, status);
sys_midibytein(i, data1);
sys_midibytein(i, data2);
break;
case 4:
case 5:
sys_midibytein(i, status);
sys_midibytein(i, data1);
break;
case 7:
nd_sysex_mode=1; nd_sysex_inword(i, status, data1, data2, data3);
break;
default:
if (nd_sysex_mode)
nd_sysex_inword(i, status, data1, data2, data3);
} }
}else break; }
- overload: ;
}
void midi_getdevs(char *indevlist, int *nindevs,
On Sun, Jun 24, 2012 at 10:23:52AM -0400, Ivica Ico Bukvic wrote:
Does this affect the 0.42 branch as well? If so, would you mind sharing
the
relevant patch or svn commit?
Many thanks!
Ivica Ico Bukvic, D.M.A Composition, Music Technology Director, DISIS Interactive Sound & Intermedia Studio Director, L2Ork Linux Laptop Orchestra Head, ICAT IMPACT Studio Virginia Tech Department of Music Blacksburg, VA 24061-0240 (540) 231-6139 (540) 231-5034 (fax) disis.music.vt.edu l2ork.music.vt.edu ico.bukvic.net