Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15653
Modified Files: Tag: devel_0_39 s_midi.c u_main.tk Log Message: dialog support for up to 16 devices
Index: s_midi.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_midi.c,v retrieving revision 1.4.4.1.2.7 retrieving revision 1.4.4.1.2.8 diff -C2 -d -r1.4.4.1.2.7 -r1.4.4.1.2.8 *** s_midi.c 25 Jul 2006 01:56:30 -0000 1.4.4.1.2.7 --- s_midi.c 25 Jul 2006 10:54:41 -0000 1.4.4.1.2.8 *************** *** 644,648 **** int noutdev, midioutdev[MAXMIDIOUTDEV]; int midiindev1, midiindev2, midiindev3, midiindev4, ! midioutdev1, midioutdev2, midioutdev3, midioutdev4;
/* these are all the devices on your system: */ --- 644,654 ---- int noutdev, midioutdev[MAXMIDIOUTDEV]; int midiindev1, midiindev2, midiindev3, midiindev4, ! midiindev5, midiindev6, midiindev7, midiindev8, ! midiindev9, midiindev10, midiindev11, midiindev12, ! midiindev13, midiindev14, midiindev15, midiindev16, ! midioutdev1, midioutdev2, midioutdev3, midioutdev4, ! midioutdev5, midioutdev6, midioutdev7, midioutdev8, ! midioutdev9, midioutdev10, midioutdev11, midioutdev12, ! midioutdev13, midioutdev14, midioutdev15, midioutdev16;
/* these are all the devices on your system: */ *************** *** 683,690 **** midiindev3 = (nindev > 2 && midiindev[2]>= 0 ? midiindev[2]+1 : 0); midiindev4 = (nindev > 3 && midiindev[3]>= 0 ? midiindev[3]+1 : 0); ! midioutdev1 = (noutdev > 0 && midioutdev[0]>=0 ? midioutdev[0]+1 : 0); ! midioutdev2 = (noutdev > 1 && midioutdev[1]>=0 ? midioutdev[1]+1 : 0); ! midioutdev3 = (noutdev > 2 && midioutdev[2]>=0 ? midioutdev[2]+1 : 0); ! midioutdev4 = (noutdev > 3 && midioutdev[3]>=0 ? midioutdev[3]+1 : 0);
#ifdef USEAPI_ALSA --- 689,724 ---- midiindev3 = (nindev > 2 && midiindev[2]>= 0 ? midiindev[2]+1 : 0); midiindev4 = (nindev > 3 && midiindev[3]>= 0 ? midiindev[3]+1 : 0); ! midiindev5 = (nindev > 4 && midiindev[4]>= 0 ? midiindev[4]+1 : 0); ! midiindev6 = (nindev > 5 && midiindev[5]>= 0 ? midiindev[5]+1 : 0); ! midiindev7 = (nindev > 6 && midiindev[6]>= 0 ? midiindev[6]+1 : 0); ! midiindev8 = (nindev > 7 && midiindev[7]>= 0 ? midiindev[7]+1 : 0); ! midiindev9 = (nindev > 8 && midiindev[8]>= 0 ? midiindev[8]+1 : 0); ! midiindev10 = (nindev > 9 && midiindev[9]>= 0 ? midiindev[9]+1 : 0); ! midiindev11 = (nindev > 10 && midiindev[10]>= 0 ? midiindev[10]+1 : 0); ! midiindev12 = (nindev > 11 && midiindev[11]>= 0 ? midiindev[11]+1 : 0); ! midiindev13 = (nindev > 12 && midiindev[12]>= 0 ? midiindev[12]+1 : 0); ! midiindev14 = (nindev > 13 && midiindev[13]>= 0 ? midiindev[13]+1 : 0); ! midiindev15 = (nindev > 14 && midiindev[14]>= 0 ? midiindev[14]+1 : 0); ! midiindev16 = (nindev > 15 && midiindev[15]>= 0 ? midiindev[15]+1 : 0); ! ! midioutdev1 = (noutdev > 0 && midioutdev[0]>= 0 ? midioutdev[0]+1 : 0); ! midioutdev2 = (noutdev > 1 && midioutdev[1]>= 0 ? midioutdev[1]+1 : 0); ! midioutdev3 = (noutdev > 2 && midioutdev[2]>= 0 ? midioutdev[2]+1 : 0); ! midioutdev4 = (noutdev > 3 && midioutdev[3]>= 0 ? midioutdev[3]+1 : 0); ! midioutdev5 = (noutdev > 4 && midioutdev[4]>= 0 ? midioutdev[4]+1 : 0); ! midioutdev6 = (noutdev > 5 && midioutdev[5]>= 0 ? midioutdev[5]+1 : 0); ! midioutdev7 = (noutdev > 6 && midioutdev[6]>= 0 ? midioutdev[6]+1 : 0); ! midioutdev8 = (noutdev > 7 && midioutdev[7]>= 0 ? midioutdev[7]+1 : 0); ! midioutdev9 = (noutdev > 8 && midioutdev[8]>= 0 ? midioutdev[8]+1 : 0); ! midioutdev10 = (noutdev > 9 && midioutdev[9]>= 0 ? midioutdev[9]+1 : 0); ! midioutdev11 = (noutdev > 10 && midioutdev[10]>= 0 ? midioutdev[10]+1 : 0); ! midioutdev12 = (noutdev > 11 && midioutdev[11]>= 0 ? midioutdev[11]+1 : 0); ! midioutdev13 = (noutdev > 12 && midioutdev[12]>= 0 ? midioutdev[12]+1 : 0); ! midioutdev14 = (noutdev > 13 && midioutdev[13]>= 0 ? midioutdev[13]+1 : 0); ! midioutdev15 = (noutdev > 14 && midioutdev[14]>= 0 ? midioutdev[14]+1 : 0); ! midioutdev16 = (noutdev > 15 && midioutdev[15]>= 0 ? midioutdev[15]+1 : 0); ! ! !
#ifdef USEAPI_ALSA *************** *** 692,701 **** sprintf(buf, "pdtk_alsa_midi_dialog %%s \ ! %s %d %d %d %d %s %d %d %d %d \ %d 1\n", indevliststring, midiindev1, midiindev2, midiindev3, midiindev4, outdevliststring, midioutdev1, midioutdev2, midioutdev3, midioutdev4, (flongform != 0)); else --- 726,741 ---- sprintf(buf, "pdtk_alsa_midi_dialog %%s \ ! %s %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %s %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d \ %d 1\n", indevliststring, midiindev1, midiindev2, midiindev3, midiindev4, + midiindev5, midiindev6, midiindev7, midiindev8, + midiindev9, midiindev10, midiindev11, midiindev12, + midiindev13, midiindev14, midiindev15, midiindev16, outdevliststring, midioutdev1, midioutdev2, midioutdev3, midioutdev4, + midioutdev5, midioutdev6, midioutdev7, midioutdev8, + midioutdev9, midioutdev10, midioutdev11, midioutdev12, + midioutdev13, midioutdev14, midioutdev15, midioutdev16, (flongform != 0)); else *************** *** 703,712 **** sprintf(buf, "pdtk_midi_dialog %%s \ ! %s %d %d %d %d %s %d %d %d %d \ %d\n", indevliststring, midiindev1, midiindev2, midiindev3, midiindev4, outdevliststring, midioutdev1, midioutdev2, midioutdev3, midioutdev4, (flongform != 0)); gfxstub_deleteforkey(0); --- 743,758 ---- sprintf(buf, "pdtk_midi_dialog %%s \ ! %s %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %s %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d \ %d\n", indevliststring, midiindev1, midiindev2, midiindev3, midiindev4, + midiindev5, midiindev6, midiindev7, midiindev8, + midiindev9, midiindev10, midiindev11, midiindev12, + midiindev13, midiindev14, midiindev15, midiindev16, outdevliststring, midioutdev1, midioutdev2, midioutdev3, midioutdev4, + midioutdev5, midioutdev6, midioutdev7, midioutdev8, + midioutdev9, midioutdev10, midioutdev11, midioutdev12, + midioutdev13, midioutdev14, midioutdev15, midioutdev16, (flongform != 0)); gfxstub_deleteforkey(0); *************** *** 720,733 **** int nmidioutdev, midioutdev[MAXMIDIOUTDEV]; int i, nindev, noutdev; ! int newmidiindev[4], newmidioutdev[4]; int alsadevin, alsadevout;
! for (i = 0; i < 4; i++) { newmidiindev[i] = atom_getintarg(i, argc, argv); ! newmidioutdev[i] = atom_getintarg(i+4, argc, argv); }
! for (i = 0, nindev = 0; i < 4; i++) { if (newmidiindev[i] > 0) --- 766,779 ---- int nmidioutdev, midioutdev[MAXMIDIOUTDEV]; int i, nindev, noutdev; ! int newmidiindev[16], newmidioutdev[16]; int alsadevin, alsadevout;
! for (i = 0; i < 16; i++) { newmidiindev[i] = atom_getintarg(i, argc, argv); ! newmidioutdev[i] = atom_getintarg(i+16, argc, argv); }
! for (i = 0, nindev = 0; i < 16; i++) { if (newmidiindev[i] > 0) *************** *** 737,741 **** } } ! for (i = 0, noutdev = 0; i < 4; i++) { if (newmidioutdev[i] > 0) --- 783,787 ---- } } ! for (i = 0, noutdev = 0; i < 16; i++) { if (newmidioutdev[i] > 0) *************** *** 745,750 **** } } ! alsadevin = atom_getintarg(8, argc, argv); ! alsadevout = atom_getintarg(9, argc, argv);
#ifdef USEAPI_ALSA --- 791,796 ---- } } ! alsadevin = atom_getintarg(16, argc, argv); ! alsadevout = atom_getintarg(17, argc, argv);
#ifdef USEAPI_ALSA
Index: u_main.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v retrieving revision 1.4.4.10.2.11 retrieving revision 1.4.4.10.2.12 diff -C2 -d -r1.4.4.10.2.11 -r1.4.4.10.2.12 *** u_main.tk 16 Oct 2005 10:46:40 -0000 1.4.4.10.2.11 --- u_main.tk 25 Jul 2006 10:54:41 -0000 1.4.4.10.2.12 *************** *** 16,24 **** if { $tcl_platform(platform) == "windows" } { set pd_nt 1 ! } elseif { $tcl_platform(os) == "Darwin" } { set pd_nt 2 ! } else { set pd_nt 0 ! }
# Tearoff is set to true by default: --- 16,24 ---- [...5021 lines suppressed...] pack $id.nortframe -side bottom -fill x -pady 2m if {$pd_nt != 1} { ! checkbutton $id.nortframe.nort -text {defeat real-time scheduling} \ ! -variable pd_nort -anchor w } button $id.nortframe.save -text {Save all settings}\ ! -command "startup_apply $id ; pd pd save-preferences \;" if {$pd_nt != 1} { ! pack $id.nortframe.nort $id.nortframe.save -side left -expand 1 } else { ! pack $id.nortframe.save -side left -expand 1 }
for {set x 0} {$x < 10} {incr x} { ! entry $id.f$x -textvariable pd_startup$x -width 80 ! bind $id.f$x <KeyPress-Return> [concat startup_ok $id] ! pdtk_standardkeybindings $id.f$x ! pack $id.f$x -side top }