Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13121
Modified Files: Tag: devel_0_39 u_main.tk Log Message: fixed audio/midi menu bug
Index: u_main.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v retrieving revision 1.4.4.10.2.12 retrieving revision 1.4.4.10.2.13 diff -C2 -d -r1.4.4.10.2.12 -r1.4.4.10.2.13 *** u_main.tk 25 Jul 2006 10:54:41 -0000 1.4.4.10.2.12 --- u_main.tk 27 Jul 2006 19:18:05 -0000 1.4.4.10.2.13 *************** *** 3515,3521 ****
proc pdtk_audio_dialog {id indevlist indev1 indev2 indev3 indev4 \ ! indev5 indev6 indev7 indev8 indev9 indev10 indev11 indev12 indev13 indev14 indev15 indev16 outdevlist outdev1 outdev2 outdev3 outdev4 \ ! outdev5 outdev6 outdev7 outdev8 outdev9 outdev10 outdev11 outdev12 outdev13 outdev14 outdev15 outdev16 longform} {
global audio_indev1 audio_indev2 audio_indev3 audio_indev4 --- 3515,3521 ----
proc pdtk_audio_dialog {id indevlist indev1 indev2 indev3 indev4 \ ! inchan1 inchan2 inchan3 inchan4 \ outdevlist outdev1 outdev2 outdev3 outdev4 \ ! outchan1 outchan2 outchan3 outchan4 sr dacblocksize advance multi longform} {
global audio_indev1 audio_indev2 audio_indev3 audio_indev4 *************** *** 3602,3605 **** --- 3602,3911 ----
+ + # input device 1 + frame $id.in1f + pack $id.in1f -side top + + checkbutton $id.in1f.x0 -variable audio_inenable1 \ + -text {input device 1} -anchor e + button $id.in1f.x1 -text [lindex $indevlist $audio_indev1] \ + -command [list audio_popup $id $id.in1f.x1 audio_indev1 $indevlist] + label $id.in1f.l2 -text "channels:" + entry $id.in1f.x2 -textvariable audio_inchan1 -width 3 + pack $id.in1f.x0 $id.in1f.x1 $id.in1f.l2 $id.in1f.x2 -side left + + # input device 2 + if {$longform && $multi > 1 && [llength $indevlist] > 1} { + frame $id.in2f + pack $id.in2f -side top + + checkbutton $id.in2f.x0 -variable audio_inenable2 \ + -text {input device 2} -anchor e + button $id.in2f.x1 -text [lindex $indevlist $audio_indev2] \ + -command [list audio_popup $id $id.in2f.x1 audio_indev2 $indevlist] + label $id.in2f.l2 -text "channels:" + entry $id.in2f.x2 -textvariable audio_inchan2 -width 3 + pack $id.in2f.x0 $id.in2f.x1 $id.in2f.l2 $id.in2f.x2 -side left + } + + # input device 3 + if {$longform && $multi > 1 && [llength $indevlist] > 2} { + frame $id.in3f + pack $id.in3f -side top + + checkbutton $id.in3f.x0 -variable audio_inenable3 \ + -text {input device 3} -anchor e + button $id.in3f.x1 -text [lindex $indevlist $audio_indev3] \ + -command [list audio_popup $id $id.in3f.x1 audio_indev3 $indevlist] + label $id.in3f.l2 -text "channels:" + entry $id.in3f.x2 -textvariable audio_inchan3 -width 3 + pack $id.in3f.x0 $id.in3f.x1 $id.in3f.l2 $id.in3f.x2 -side left + } + + # input device 4 + if {$longform && $multi > 1 && [llength $indevlist] > 3} { + frame $id.in4f + pack $id.in4f -side top + + checkbutton $id.in4f.x0 -variable audio_inenable4 \ + -text {input device 4} -anchor e + button $id.in4f.x1 -text [lindex $indevlist $audio_indev4] \ + -command [list audio_popup $id $id.in4f.x1 audio_indev4 $indevlist] + label $id.in4f.l2 -text "channels:" + entry $id.in4f.x2 -textvariable audio_inchan4 -width 3 + pack $id.in4f.x0 $id.in4f.x1 $id.in4f.l2 $id.in4f.x2 -side left + } + + # output device 1 + frame $id.out1f + pack $id.out1f -side top + + checkbutton $id.out1f.x0 -variable audio_outenable1 -text {output device 1} \ + -anchor e + if {$multi == 0} { + label $id.out1f.l1 \ + -text "(same as input device) .............. " + } else { + button $id.out1f.x1 -text [lindex $outdevlist $audio_outdev1] \ + -command \ + [list audio_popup $id $id.out1f.x1 audio_outdev1 $outdevlist] + } + label $id.out1f.l2 -text "channels:" + entry $id.out1f.x2 -textvariable audio_outchan1 -width 3 + if {$multi == 0} { + pack $id.out1f.x0 $id.out1f.l1 $id.out1f.x2 -side left + } else { + pack $id.out1f.x0 $id.out1f.x1 $id.out1f.l2 $id.out1f.x2 -side left + } + + # output device 2 + if {$longform && $multi > 1 && [llength $indevlist] > 1} { + frame $id.out2f + pack $id.out2f -side top + + checkbutton $id.out2f.x0 -variable audio_outenable2 \ + -text {output device 2} -anchor e + button $id.out2f.x1 -text [lindex $outdevlist $audio_outdev2] \ + -command \ + [list audio_popup $id $id.out2f.x1 audio_outdev2 $outdevlist] + label $id.out2f.l2 -text "channels:" + entry $id.out2f.x2 -textvariable audio_outchan2 -width 3 + pack $id.out2f.x0 $id.out2f.x1 $id.out2f.l2 $id.out2f.x2 -side left + } + + # output device 3 + if {$longform && $multi > 1 && [llength $indevlist] > 2} { + frame $id.out3f + pack $id.out3f -side top + + checkbutton $id.out3f.x0 -variable audio_outenable3 \ + -text {output device 3} -anchor e + button $id.out3f.x1 -text [lindex $outdevlist $audio_outdev3] \ + -command \ + [list audio_popup $id $id.out3f.x1 audio_outdev3 $outdevlist] + label $id.out3f.l2 -text "channels:" + entry $id.out3f.x2 -textvariable audio_outchan3 -width 3 + pack $id.out3f.x0 $id.out3f.x1 $id.out3f.l2 $id.out3f.x2 -side left + } + + # output device 4 + if {$longform && $multi > 1 && [llength $indevlist] > 3} { + frame $id.out4f + pack $id.out4f -side top + + checkbutton $id.out4f.x0 -variable audio_outenable4 \ + -text {output device 4} -anchor e + button $id.out4f.x1 -text [lindex $outdevlist $audio_outdev4] \ + -command \ + [list audio_popup $id $id.out4f.x1 audio_outdev4 $outdevlist] + label $id.out4f.l2 -text "channels:" + entry $id.out4f.x2 -textvariable audio_outchan4 -width 3 + pack $id.out4f.x0 $id.out4f.x1 $id.out4f.l2 $id.out4f.x2 -side left + } + + # if not the "long form" but if "multi" is 2, make a button to + # restart with longform set. + + if {$longform == 0 && $multi > 1} { + frame $id.longbutton + pack $id.longbutton -side top + button $id.longbutton.b -text {use multiple devices} \ + -command {pd pd audio-properties 1 ;} + pack $id.longbutton.b + } + bind $id.srf.x1 <KeyPress-Return> [concat audio_ok $id] + bind $id.srf.x2 <KeyPress-Return> [concat audio_ok $id] + bind $id.in1f.x2 <KeyPress-Return> [concat audio_ok $id] + bind $id.out1f.x2 <KeyPress-Return> [concat audio_ok $id] + $id.srf.x1 select from 0 + $id.srf.x1 select adjust end + focus $id.srf.x1 + pdtk_standardkeybindings $id.srf.x1 + pdtk_standardkeybindings $id.srf.x2 + pdtk_standardkeybindings $id.in1f.x2 + pdtk_standardkeybindings $id.out1f.x2 + } + + ####################### midi dialog ################## + + proc midi_apply {id} { + global midi_indev1 midi_indev2 midi_indev3 midi_indev4 + global midi_indev5 midi_indev6 midi_indev7 midi_indev8 + global midi_indev9 midi_indev10 midi_indev11 midi_indev12 + global midi_indev13 midi_indev14 midi_indev15 midi_indev16 + + global midi_outdev1 midi_outdev2 midi_outdev3 midi_outdev4 + global midi_outdev5 midi_outdev6 midi_outdev7 midi_outdev8 + global midi_outdev9 midi_outdev10 midi_outdev11 midi_outdev12 + global midi_outdev13 midi_outdev14 midi_outdev15 midi_outdev16 + + global midi_alsain midi_alsaout + + pd [concat pd midi-dialog \ + $midi_indev1 \ + $midi_indev2 \ + $midi_indev3 \ + $midi_indev4 \ + $midi_indev5 \ + $midi_indev6 \ + $midi_indev7 \ + $midi_indev8 \ + $midi_indev9 \ + $midi_indev10 \ + $midi_indev11 \ + $midi_indev12 \ + $midi_indev13 \ + $midi_indev14 \ + $midi_indev15 \ + $midi_indev16 \ + $midi_outdev1 \ + $midi_outdev2 \ + $midi_outdev3 \ + $midi_outdev4 \ + $midi_outdev5 \ + $midi_outdev6 \ + $midi_outdev7 \ + $midi_outdev8 \ + $midi_outdev9 \ + $midi_outdev10 \ + $midi_outdev11 \ + $midi_outdev12 \ + $midi_outdev13 \ + $midi_outdev14 \ + $midi_outdev15 \ + $midi_outdev16 \ + $midi_alsain \ + $midi_alsaout \ + ;] + } + + proc midi_cancel {id} { + pd [concat $id cancel ;] + } + + proc midi_ok {id} { + midi_apply $id + midi_cancel $id + } + + # callback from popup menu + proc midi_popup_action {buttonname varname devlist index} { + global midi_indevlist midi_outdevlist $varname + $buttonname configure -text [lindex $devlist $index] + # puts stderr [concat popup_action $buttonname $varname $index] + set $varname $index + } + + # create a popup menu + proc midi_popup {name buttonname varname devlist} { + if [winfo exists $name.popup] {destroy $name.popup} + menu $name.popup -tearoff false + # puts stderr [concat $devlist ] + for {set x 0} {$x<[llength $devlist]} {incr x} { + $name.popup add command -label [lindex $devlist $x] \ + -command [list midi_popup_action \ + $buttonname $varname $devlist $x] + } + tk_popup $name.popup [winfo pointerx $name] [winfo pointery $name] 0 + } + + # start a dialog window to select midi devices. "longform" asks us to make + # controls for opening several devices; if not, we get an extra button to + # turn longform on and restart the dialog. + + proc pdtk_midi_dialog {id indevlist indev1 indev2 indev3 indev4 \ + indev5 indev6 indev7 indev8 indev9 indev10 indev11 indev12 indev13 indev14 indev15 indev16 + outdevlist outdev1 outdev2 outdev3 outdev4 \ + outdev5 outdev6 outdev7 outdev8 outdev9 outdev10 outdev11 outdev12 outdev13 outdev14 outdev15 outdev16 longform} { + + global midi_indev1 midi_indev2 midi_indev3 midi_indev4 + global midi_indev5 midi_indev6 midi_indev7 midi_indev8 + global midi_indev9 midi_indev10 midi_indev11 midi_indev12 + global midi_indev13 midi_indev14 midi_indev15 midi_indev16 + + global midi_outdev1 midi_outdev2 midi_outdev3 midi_outdev4 + global midi_outdev5 midi_outdev6 midi_outdev7 midi_outdev8 + global midi_outdev9 midi_outdev10 midi_outdev11 midi_outdev12 + global midi_outdev13 midi_outdev14 midi_outdev15 midi_outdev16 + + global midi_indevlist midi_outdevlist + global midi_alsain midi_alsaout + + set midi_indev1 $indev1 + set midi_indev2 $indev2 + set midi_indev3 $indev3 + set midi_indev4 $indev4 + set midi_indev5 $indev5 + set midi_indev6 $indev6 + set midi_indev7 $indev7 + set midi_indev8 $indev8 + set midi_indev9 $indev9 + set midi_indev10 $indev10 + set midi_indev11 $indev11 + set midi_indev12 $indev12 + set midi_indev13 $indev13 + set midi_indev14 $indev14 + set midi_indev15 $indev15 + set midi_indev16 $indev16 + + set midi_outdev1 $outdev1 + set midi_outdev2 $outdev2 + set midi_outdev3 $outdev3 + set midi_outdev4 $outdev4 + set midi_outdev5 $outdev5 + set midi_outdev6 $outdev6 + set midi_outdev7 $outdev7 + set midi_outdev8 $outdev8 + set midi_outdev9 $outdev9 + set midi_outdev10 $outdev10 + set midi_outdev11 $outdev11 + set midi_outdev12 $outdev12 + set midi_outdev13 $outdev13 + set midi_outdev14 $outdev14 + set midi_outdev15 $outdev15 + set midi_outdev16 $outdev16 + + + set midi_indevlist $indevlist + set midi_outdevlist $outdevlist + set midi_alsain [llength $indevlist] + set midi_alsaout [llength $outdevlist] + + toplevel $id + wm title $id {midi} + wm protocol $id WM_DELETE_WINDOW [concat midi_cancel $id] + + frame $id.buttonframe + pack $id.buttonframe -side bottom -fill x -pady 2m + button $id.buttonframe.cancel -text {Cancel}\ + -command "midi_cancel $id" + button $id.buttonframe.apply -text {Apply}\ + -command "midi_apply $id" + button $id.buttonframe.ok -text {OK}\ + -command "midi_ok $id" + pack $id.buttonframe.cancel -side left -expand 1 + pack $id.buttonframe.apply -side left -expand 1 + pack $id.buttonframe.ok -side left -expand 1 + # input device 1 frame $id.in1f *************** *** 3952,4070 ****
! # if not the "long form" but if "multi" is 2, make a button to # restart with longform set.
! if {$longform == 0 && $multi > 1} { frame $id.longbutton pack $id.longbutton -side top button $id.longbutton.b -text {use multiple devices} \ ! -command {pd pd audio-properties 1 ;} pack $id.longbutton.b } - bind $id.srf.x1 <KeyPress-Return> [concat audio_ok $id] - bind $id.srf.x2 <KeyPress-Return> [concat audio_ok $id] - bind $id.in1f.x2 <KeyPress-Return> [concat audio_ok $id] - bind $id.out1f.x2 <KeyPress-Return> [concat audio_ok $id] - $id.srf.x1 select from 0 - $id.srf.x1 select adjust end - focus $id.srf.x1 - pdtk_standardkeybindings $id.srf.x1 - pdtk_standardkeybindings $id.srf.x2 - pdtk_standardkeybindings $id.in1f.x2 - pdtk_standardkeybindings $id.out1f.x2 - } - - ####################### midi dialog ################## - - proc midi_apply {id} { - global midi_indev1 midi_indev2 midi_indev3 midi_indev4 - global midi_indev5 midi_indev6 midi_indev7 midi_indev8 - global midi_indev9 midi_indev10 midi_indev11 midi_indev12 - global midi_indev13 midi_indev14 midi_indev15 midi_indev16 - - global midi_outdev1 midi_outdev2 midi_outdev3 midi_outdev4 - global midi_outdev5 midi_outdev6 midi_outdev7 midi_outdev8 - global midi_outdev9 midi_outdev10 midi_outdev11 midi_outdev12 - global midi_outdev13 midi_outdev14 midi_outdev15 midi_outdev16 - - global midi_alsain midi_alsaout - - pd [concat pd midi-dialog \ - $midi_indev1 \ - $midi_indev2 \ - $midi_indev3 \ - $midi_indev4 \ - $midi_indev5 \ - $midi_indev6 \ - $midi_indev7 \ - $midi_indev8 \ - $midi_indev9 \ - $midi_indev10 \ - $midi_indev11 \ - $midi_indev12 \ - $midi_indev13 \ - $midi_indev14 \ - $midi_indev15 \ - $midi_indev16 \ - $midi_outdev1 \ - $midi_outdev2 \ - $midi_outdev3 \ - $midi_outdev4 \ - $midi_outdev5 \ - $midi_outdev6 \ - $midi_outdev7 \ - $midi_outdev8 \ - $midi_outdev9 \ - $midi_outdev10 \ - $midi_outdev11 \ - $midi_outdev12 \ - $midi_outdev13 \ - $midi_outdev14 \ - $midi_outdev15 \ - $midi_outdev16 \ - $midi_alsain \ - $midi_alsaout \ - ;] - } - - proc midi_cancel {id} { - pd [concat $id cancel ;] - } - - proc midi_ok {id} { - midi_apply $id - midi_cancel $id - } - - # callback from popup menu - proc midi_popup_action {buttonname varname devlist index} { - global midi_indevlist midi_outdevlist $varname - $buttonname configure -text [lindex $devlist $index] - # puts stderr [concat popup_action $buttonname $varname $index] - set $varname $index }
! # create a popup menu ! proc midi_popup {name buttonname varname devlist} { ! if [winfo exists $name.popup] {destroy $name.popup} ! menu $name.popup -tearoff false ! # puts stderr [concat $devlist ] ! for {set x 0} {$x<[llength $devlist]} {incr x} { ! $name.popup add command -label [lindex $devlist $x] \ ! -command [list midi_popup_action \ ! $buttonname $varname $devlist $x] ! } ! tk_popup $name.popup [winfo pointerx $name] [winfo pointery $name] 0 ! } ! ! # start a dialog window to select midi devices. "longform" asks us to make ! # controls for opening several devices; if not, we get an extra button to ! # turn longform on and restart the dialog. ! ! proc pdtk_midi_dialog {id indevlist indev1 indev2 indev3 indev4 \ ! indev5 indev6 indev7 indev8 indev9 indev10 indev11 indev12 indev13 indev14 indev15 indev16 ! outdevlist outdev1 outdev2 outdev3 outdev4 \ ! outdev5 outdev6 outdev7 outdev8 outdev9 outdev10 outdev11 outdev12 outdev13 outdev14 outdev15 outdev16 longform} { ! global midi_indev1 midi_indev2 midi_indev3 midi_indev4 global midi_indev5 midi_indev6 midi_indev7 midi_indev8 --- 4258,4275 ----
! # if not the "long form" make a button to # restart with longform set.
! if {$longform == 0} { frame $id.longbutton pack $id.longbutton -side top button $id.longbutton.b -text {use multiple devices} \ ! -command {pd pd midi-properties 1 ;} pack $id.longbutton.b } }
! proc pdtk_alsa_midi_dialog {id indevlist indev1 indev2 indev3 indev4 \ ! outdevlist outdev1 outdev2 outdev3 outdev4 longform alsa} { global midi_indev1 midi_indev2 midi_indev3 midi_indev4 global midi_indev5 midi_indev6 midi_indev7 midi_indev8 *************** *** 4080,4083 **** --- 4285,4289 ---- global midi_alsain midi_alsaout
+ set midi_indev1 $indev1 set midi_indev2 $indev2 *************** *** 4136,4139 **** --- 4342,4389 ---- pack $id.buttonframe.ok -side left -expand 1
+ frame $id.in1f + pack $id.in1f -side top + + if {$alsa == 0} { + # input device 1 + label $id.in1f.l1 -text "input device 1:" + button $id.in1f.x1 -text [lindex $indevlist $midi_indev1] \ + -command [list midi_popup $id $id.in1f.x1 midi_indev1 $indevlist] + pack $id.in1f.l1 $id.in1f.x1 -side left + + # input device 2 + if {$longform && [llength $indevlist] > 2} { + frame $id.in2f + pack $id.in2f -side top + + label $id.in2f.l1 -text "input device 2:" + button $id.in2f.x1 -text [lindex $indevlist $midi_indev2] \ + -command [list midi_popup $id $id.in2f.x1 midi_indev2 $indevlist] + pack $id.in2f.l1 $id.in2f.x1 -side left + } + + # input device 3 + if {$longform && [llength $indevlist] > 3} { + frame $id.in3f + pack $id.in3f -side top + + label $id.in3f.l1 -text "input device 3:" + button $id.in3f.x1 -text [lindex $indevlist $midi_indev3] \ + -command [list midi_popup $id $id.in3f.x1 midi_indev3 $indevlist] + pack $id.in3f.l1 $id.in3f.x1 -side left + } + + # input device 4 + if {$longform && [llength $indevlist] > 4} { + frame $id.in4f + pack $id.in4f -side top + + label $id.in4f.l1 -text "input device 4:" + button $id.in4f.x1 -text [lindex $indevlist $midi_indev4] \ + -command [list midi_popup $id $id.in4f.x1 midi_indev4 $indevlist] + pack $id.in4f.l1 $id.in4f.x1 -side left + } + + # input device 1 frame $id.in1f *************** *** 4492,4664 **** frame $id.longbutton pack $id.longbutton -side top - button $id.longbutton.b -text {use multiple devices} \ - -command {pd pd midi-properties 1 ;} - pack $id.longbutton.b - } - } - - proc pdtk_alsa_midi_dialog {id indevlist indev1 indev2 indev3 indev4 \ - outdevlist outdev1 outdev2 outdev3 outdev4 longform alsa} { - global midi_indev1 midi_indev2 midi_indev3 midi_indev4 - global midi_indev5 midi_indev6 midi_indev7 midi_indev8 - global midi_indev9 midi_indev10 midi_indev11 midi_indev12 - global midi_indev13 midi_indev14 midi_indev15 midi_indev16 - - global midi_outdev1 midi_outdev2 midi_outdev3 midi_outdev4 - global midi_outdev5 midi_outdev6 midi_outdev7 midi_outdev8 - global midi_outdev9 midi_outdev10 midi_outdev11 midi_outdev12 - global midi_outdev13 midi_outdev14 midi_outdev15 midi_outdev16 - - global midi_indevlist midi_outdevlist - global midi_alsain midi_alsaout - - - set midi_indev1 $indev1 - set midi_indev2 $indev2 - set midi_indev3 $indev3 - set midi_indev4 $indev4 - set midi_indev5 $indev5 - set midi_indev6 $indev6 - set midi_indev7 $indev7 - set midi_indev8 $indev8 - set midi_indev9 $indev9 - set midi_indev10 $indev10 - set midi_indev11 $indev11 - set midi_indev12 $indev12 - set midi_indev13 $indev13 - set midi_indev14 $indev14 - set midi_indev15 $indev15 - set midi_indev16 $indev16 - - set midi_outdev1 $outdev1 - set midi_outdev2 $outdev2 - set midi_outdev3 $outdev3 - set midi_outdev4 $outdev4 - set midi_outdev5 $outdev5 - set midi_outdev6 $outdev6 - set midi_outdev7 $outdev7 - set midi_outdev8 $outdev8 - set midi_outdev9 $outdev9 - set midi_outdev10 $outdev10 - set midi_outdev11 $outdev11 - set midi_outdev12 $outdev12 - set midi_outdev13 $outdev13 - set midi_outdev14 $outdev14 - set midi_outdev15 $outdev15 - set midi_outdev16 $outdev16 - - - set midi_indevlist $indevlist - set midi_outdevlist $outdevlist - set midi_alsain [llength $indevlist] - set midi_alsaout [llength $outdevlist] - - toplevel $id - wm title $id {midi} - wm protocol $id WM_DELETE_WINDOW [concat midi_cancel $id] - - frame $id.buttonframe - pack $id.buttonframe -side bottom -fill x -pady 2m - button $id.buttonframe.cancel -text {Cancel}\ - -command "midi_cancel $id" - button $id.buttonframe.apply -text {Apply}\ - -command "midi_apply $id" - button $id.buttonframe.ok -text {OK}\ - -command "midi_ok $id" - pack $id.buttonframe.cancel -side left -expand 1 - pack $id.buttonframe.apply -side left -expand 1 - pack $id.buttonframe.ok -side left -expand 1 - - frame $id.in1f - pack $id.in1f -side top - - if {$alsa == 0} { - # input device 1 - label $id.in1f.l1 -text "input device 1:" - button $id.in1f.x1 -text [lindex $indevlist $midi_indev1] \ - -command [list midi_popup $id $id.in1f.x1 midi_indev1 $indevlist] - pack $id.in1f.l1 $id.in1f.x1 -side left - - # input device 2 - if {$longform && [llength $indevlist] > 2} { - frame $id.in2f - pack $id.in2f -side top - - label $id.in2f.l1 -text "input device 2:" - button $id.in2f.x1 -text [lindex $indevlist $midi_indev2] \ - -command [list midi_popup $id $id.in2f.x1 midi_indev2 $indevlist] - pack $id.in2f.l1 $id.in2f.x1 -side left - } - - # input device 3 - if {$longform && [llength $indevlist] > 3} { - frame $id.in3f - pack $id.in3f -side top - - label $id.in3f.l1 -text "input device 3:" - button $id.in3f.x1 -text [lindex $indevlist $midi_indev3] \ - -command [list midi_popup $id $id.in3f.x1 midi_indev3 $indevlist] - pack $id.in3f.l1 $id.in3f.x1 -side left - } - - # input device 4 - if {$longform && [llength $indevlist] > 4} { - frame $id.in4f - pack $id.in4f -side top - - label $id.in4f.l1 -text "input device 4:" - button $id.in4f.x1 -text [lindex $indevlist $midi_indev4] \ - -command [list midi_popup $id $id.in4f.x1 midi_indev4 $indevlist] - pack $id.in4f.l1 $id.in4f.x1 -side left - } - - # output device 1 - - frame $id.out1f - pack $id.out1f -side top - label $id.out1f.l1 -text "output device 1:" - button $id.out1f.x1 -text [lindex $outdevlist $midi_outdev1] \ - -command [list midi_popup $id $id.out1f.x1 midi_outdev1 $outdevlist] - pack $id.out1f.l1 $id.out1f.x1 -side left - - # output device 2 - if {$longform && [llength $indevlist] > 2} { - frame $id.out2f - pack $id.out2f -side top - label $id.out2f.l1 -text "output device 2:" - button $id.out2f.x1 -text [lindex $outdevlist $midi_outdev2] \ - -command \ - [list midi_popup $id $id.out2f.x1 midi_outdev2 $outdevlist] - pack $id.out2f.l1 $id.out2f.x1 -side left - } - - # output device 3 - if {$longform && [llength $indevlist] > 3} { - frame $id.out3f - pack $id.out3f -side top - label $id.out3f.l1 -text "output device 3:" - button $id.out3f.x1 -text [lindex $outdevlist $midi_outdev3] \ - -command \ - [list midi_popup $id $id.out3f.x1 midi_outdev3 $outdevlist] - pack $id.out3f.l1 $id.out3f.x1 -side left - } - - # output device 4 - if {$longform && [llength $indevlist] > 4} { - frame $id.out4f - pack $id.out4f -side top - label $id.out4f.l1 -text "output device 4:" - button $id.out4f.x1 -text [lindex $outdevlist $midi_outdev4] \ - -command \ - [list midi_popup $id $id.out4f.x1 midi_outdev4 $outdevlist] - pack $id.out4f.l1 $id.out4f.x1 -side left - } - - # if not the "long form" make a button to - # restart with longform set. - - if {$longform == 0} { - frame $id.longbutton - pack $id.longbutton -side top button $id.longbutton.b -text {use multiple alsa devices} \ -command {pd pd midi-properties 1 ;} --- 4742,4745 ----