Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv323
Modified Files: Tag: desiredata builtins.c s_midi.c s_midi_alsa.c Log Message: MIDI sysex fix by Jamie Bullock
Index: builtins.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/builtins.c,v retrieving revision 1.1.2.47 retrieving revision 1.1.2.48 diff -C2 -d -r1.1.2.47 -r1.1.2.48 *** builtins.c 20 Jul 2007 21:37:47 -0000 1.1.2.47 --- builtins.c 24 Jul 2007 21:17:13 -0000 1.1.2.48 *************** *** 2113,2117 ****
static t_class *midiout_class; ! void sys_putmidibyte(int portno, int byte); struct t_midiout : t_object { t_float portno; --- 2113,2117 ----
static t_class *midiout_class; ! void outmidi_byte(int portno, int byte); struct t_midiout : t_object { t_float portno; *************** *** 2128,2132 **** } static void midiout_float(t_midiout *x, t_floatarg f){ ! sys_putmidibyte((int)x->portno-1, (int)f); } static void midiout_setup() { --- 2128,2132 ---- } static void midiout_float(t_midiout *x, t_floatarg f){ ! outmidi_byte((int)x->portno-1, (int)f); } static void midiout_setup() { *************** *** 2717,2722 **** } } ! t_atom *p = x->vec + x->n-1; ! union word *w = h->vec + x->n-1; for (int i = x->n; i--; p--, w--) { switch (p->a_type) { --- 2717,2722 ---- } } ! t_atom *p = x->vec + x->n-1; ! t_word *w = h->vec + x->n-1; for (int i = x->n; i--; p--, w--) { switch (p->a_type) {
Index: s_midi.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_midi.c,v retrieving revision 1.4.4.1.2.12.2.11 retrieving revision 1.4.4.1.2.12.2.12 diff -C2 -d -r1.4.4.1.2.12.2.11 -r1.4.4.1.2.12.2.12 *** s_midi.c 10 Jul 2007 07:03:34 -0000 1.4.4.1.2.12.2.11 --- s_midi.c 24 Jul 2007 21:17:14 -0000 1.4.4.1.2.12.2.12 *************** *** 183,186 **** --- 183,193 ---- }
+ void outmidi_byte(int portno, int value) { + #ifdef USEAPI_ALSA + if (sys_midiapi == API_ALSA) sys_alsa_putmidibyte(portno, value); else + #endif + sys_putmidibyte(portno, value); + } + void outmidi_mclk(int portno) {sys_queuemidimess(portno, 1, 0xf8, 0,0);}
Index: s_midi_alsa.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_midi_alsa.c,v retrieving revision 1.1.2.2.2.6.2.4 retrieving revision 1.1.2.2.2.6.2.5 diff -C2 -d -r1.1.2.2.2.6.2.4 -r1.1.2.2.2.6.2.5 *** s_midi_alsa.c 24 Jul 2007 21:03:42 -0000 1.1.2.2.2.6.2.4 --- s_midi_alsa.c 24 Jul 2007 21:17:14 -0000 1.1.2.2.2.6.2.5 *************** *** 157,163 **** if (portno >= 0 && portno < alsa_nmidiout) { // repack into 1 byte char and put somewhere to point at ! unsigned char *dataptr = (unsigned char *)malloc(1); ! memcpy(dataptr,&byte,1); ! snd_seq_ev_set_sysex(&ev,1,dataptr); //...set_variable *should* have worked but didn't snd_seq_ev_set_direct(&ev); snd_seq_ev_set_subs(&ev); --- 157,162 ---- if (portno >= 0 && portno < alsa_nmidiout) { // repack into 1 byte char and put somewhere to point at ! unsigned char data = (unsigned char)byte; ! snd_seq_ev_set_sysex(&ev,1,&data); //...set_variable *should* have worked but didn't snd_seq_ev_set_direct(&ev); snd_seq_ev_set_subs(&ev);