diff --git a/l2ork_addons/K12/icons/data-sound.xcf b/l2ork_addons/K12/icons/data-sound.xcf new file mode 100644 index 0000000000000000000000000000000000000000..4b4e9866212d81c7b8709259a76e21286ae5b834 Binary files /dev/null and b/l2ork_addons/K12/icons/data-sound.xcf differ diff --git a/l2ork_addons/K12/icons/data.png b/l2ork_addons/K12/icons/data.png new file mode 100644 index 0000000000000000000000000000000000000000..a25fa64a04577c123c989d7195bdfdaf2f11adbd Binary files /dev/null and b/l2ork_addons/K12/icons/data.png differ diff --git a/l2ork_addons/K12/icons/data_on.png b/l2ork_addons/K12/icons/data_on.png new file mode 100644 index 0000000000000000000000000000000000000000..c283677b4ef6e520397bed527aa24aae1bfe46ec Binary files /dev/null and b/l2ork_addons/K12/icons/data_on.png differ diff --git a/l2ork_addons/K12/icons/sound.png b/l2ork_addons/K12/icons/sound.png new file mode 100644 index 0000000000000000000000000000000000000000..a90a95cd9480455153b64085326a6493e1809eb1 Binary files /dev/null and b/l2ork_addons/K12/icons/sound.png differ diff --git a/l2ork_addons/K12/icons/sound_on.png b/l2ork_addons/K12/icons/sound_on.png new file mode 100644 index 0000000000000000000000000000000000000000..a0f8a597f453bb4d725a90bb02b5456fbf830fa2 Binary files /dev/null and b/l2ork_addons/K12/icons/sound_on.png differ diff --git a/l2ork_addons/K12/logic_mapper-help.pd b/l2ork_addons/K12/logic_mapper-help.pd index 5552c22c607a5d431ecafefb334e7c0836a04649..db620fa5ddccb3083196ed35a803f0124b5d7c2c 100755 --- a/l2ork_addons/K12/logic_mapper-help.pd +++ b/l2ork_addons/K12/logic_mapper-help.pd @@ -1,9 +1,9 @@ #N canvas 110 24 503 501 10; -#X obj 20 293 cnv 15 486 220 empty empty empty 20 12 0 14 -233017 -66577 +#X obj 20 313 cnv 15 486 220 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 25 184 K12/wii_speed; -#X obj 123 530 K12/instr_sustained2; -#X obj 25 755 output; +#X obj 123 550 K12/instr_sustained2; +#X obj 25 795 output; #N canvas 521 27 450 514 META 0; #X text 9 66 OUTLET_0 Connect this to an instrument or another math object; @@ -12,28 +12,29 @@ object; each other; #X text 9 104 OUTLET_1 Connect this to an instrument or another math object; -#X restore 458 819 pd META; +#X restore 458 871 pd META; #X obj 13 43 cnv 3 501 3 empty empty empty 5 14 0 20 -260097 -191407 0; #X obj 13 14 cnv 15 501 28 empty empty Mapper 5 14 0 20 -139274 -262144 0; #X obj 484 46 ggee/image @pd_extra/K12/icons/l2ork.png; #X obj 25 69 K12/wii_connect; -#X text 133 339 With the top toggle option selected \, the outlets +#X text 133 359 With the top toggle option selected \, the outlets will always be zero.; -#X text 133 305 There are four different functions that the Mapper +#X text 133 325 There are four different functions that the Mapper object will do.; -#X text 133 373 With the second toggle option selected \, the right +#X text 133 393 With the second toggle option selected \, the right outlet will be the opposite of the left outlet (in other words \, when one is 0 the other is 1).; -#X text 134 457 With the fourth toggle option selected \, as the left +#X text 134 477 With the fourth toggle option selected \, as the left slider increases from 0 to 1 the right slider increases slowly at first and then quickly \, also from 0 to 1; -#X text 133 420 With the third toggle option selected \, the left slider +#X text 133 440 With the third toggle option selected \, the left slider ranges from 0 to 1 and the right slider ranges from 0 to 0.5; -#X obj 25 298 K12/logic_mapper; -#X obj 25 530 K12/instr_sustained1; -#X obj 124 640 K12/fx_reverb; +#X obj 25 318 K12/logic_mapper; +#X obj 25 550 K12/instr_sustained1; +#X obj 124 660 K12/fx_reverb; +#X obj 133 213 K12/math_number; #X connect 1 0 14 0; #X connect 2 0 16 0; #X connect 8 0 1 0; @@ -41,3 +42,4 @@ ranges from 0 to 1 and the right slider ranges from 0 to 0.5; #X connect 14 1 2 0; #X connect 15 0 3 0; #X connect 16 0 3 0; +#X connect 17 0 14 0; diff --git a/pd/src/pd.tk b/pd/src/pd.tk index aefb3c5c46379b5ff054c1de5768f6f443fd5bf7..47cbd7eada97c9b19e27540a842c7dd89ac7fd33 100644 --- a/pd/src/pd.tk +++ b/pd/src/pd.tk @@ -347,45 +347,49 @@ proc pdtk_enable_k12_mode {extra_dir} { image create photo i.wii_buttons -file $extra_dir/K12/icons/wii_buttons.png image create photo i.wii_speed -file $extra_dir/K12/icons/wii_speed.png image create photo i.wii_hit -file $extra_dir/K12/icons/wii_hit.png - image create photo i.sarcduino -file $extra_dir/K12/icons/sarcduino_on.png + image create photo i.sarcduino -file $extra_dir/K12/icons/sarcduino_on.png image create photo i.sarcduino_digital -file $extra_dir/K12/icons/sarcduino_digital.png image create photo i.sarcduino_analog -file $extra_dir/K12/icons/sarcduino_analog.png image create photo i.sarcduino_hit -file $extra_dir/K12/icons/sarcduino_hit.png image create photo i.sarcduino_piezo -file $extra_dir/K12/icons/sarcduino_piezo.png #image create photo i.sarcduino_net -file $extra_dir/K12/icons/sarcduino_net.png - image create photo i.math_number -file $extra_dir/K12/icons/math_number.png + image create photo i.math_number -file $extra_dir/K12/icons/math_number.png image create photo i.math_netsend -file $extra_dir/K12/icons/math_netsend.png image create photo i.math_netreceive -file $extra_dir/K12/icons/math_netreceive.png image create photo i.math_tag -file $extra_dir/K12/icons/math_tag.png image create photo i.math_routebytag -file $extra_dir/K12/icons/math_routebytag.png - image create photo i.math_average -file $extra_dir/K12/icons/math_average.png + image create photo i.math_average -file $extra_dir/K12/icons/math_average.png image create photo i.math_random -file $extra_dir/K12/icons/math_random.png image create photo i.math_add -file $extra_dir/K12/icons/math_add.png image create photo i.math_subtract -file $extra_dir/K12/icons/math_subtract.png image create photo i.math_multiply -file $extra_dir/K12/icons/math_multiply.png - image create photo i.math_divide -file $extra_dir/K12/icons/math_divide.png + image create photo i.math_divide -file $extra_dir/K12/icons/math_divide.png image create photo i.math_scale -file $extra_dir/K12/icons/math_scale.png + image create photo i.logic_compare -file $extra_dir/K12/icons/logic_compare.png - #image create photo i.logic_mapper -file $extra_dir/K12/icons/logic_mapper.png + image create photo i.logic_mapper -file $extra_dir/K12/icons/logic_mapper.png image create photo i.logic_metronome -file $extra_dir/K12/icons/logic_metronome.png image create photo i.logic_counter -file $extra_dir/K12/icons/logic_counter.png image create photo i.logic_sequencer -file $extra_dir/K12/icons/logic_sequencer.png + image create photo i.preset -file $extra_dir/K12/icons/preset.png + image create photo i.comment -file $extra_dir/K12/icons/comment.png + image create photo i.signal_microphone -file $extra_dir/K12/icons/signal_microphone.png image create photo i.signal_netsend -file $extra_dir/K12/icons/signal_netsend.png image create photo i.signal_netreceive -file $extra_dir/K12/icons/signal_netreceive.png image create photo i.signal_sampler -file $extra_dir/K12/icons/signal_sampler.png image create photo i.signal_player -file $extra_dir/K12/icons/signal_player.png - image create photo i.signal_envelope -file $extra_dir/K12/icons/signal_envelope.png image create photo i.signal_sine -file $extra_dir/K12/icons/signal_sine.png image create photo i.signal_saw -file $extra_dir/K12/icons/signal_saw.png image create photo i.signal_square -file $extra_dir/K12/icons/signal_square.png image create photo i.signal_triangle -file $extra_dir/K12/icons/signal_triangle.png + image create photo i.signal_envelope -file $extra_dir/K12/icons/signal_envelope.png image create photo i.signal_noise -file $extra_dir/K12/icons/signal_noise.png image create photo i.signal_pink -file $extra_dir/K12/icons/signal_pink.png @@ -402,12 +406,15 @@ proc pdtk_enable_k12_mode {extra_dir} { image create photo i.fx_reverb -file $extra_dir/K12/icons/fx_reverb.png image create photo i.output -file $extra_dir/K12/icons/audio_on.png - image create photo i.preset -file $extra_dir/K12/icons/preset.png - image create photo i.comment -file $extra_dir/K12/icons/comment.png image create photo i.edit -file $extra_dir/K12/icons/edit.png image create photo i.perform -file $extra_dir/K12/icons/perform.png + image create photo i.data -file $extra_dir/K12/icons/data.png + image create photo i.sound -file $extra_dir/K12/icons/sound.png + image create photo i.data_on -file $extra_dir/K12/icons/data_on.png + image create photo i.sound_on -file $extra_dir/K12/icons/sound_on.png + #pack forget .controls.switches.audiobutton #pack forget .controls.inout #.mbar.audio delete 0 2 @@ -2260,6 +2267,24 @@ proc put_K12_objects {name object} { } } +proc pdtk_k12_show_data_icons {name} { + $name.k12frame.datasound.data configure -image i.data_on + $name.k12frame.datasound.sound configure -image i.sound + catch { + pack forget $name.k12frame.signal_1 $name.k12frame.signal_2 $name.k12frame.signal_3 $name.k12frame.instr $name.k12frame.fx $name.k12frame.output + pack $name.k12frame.wii $name.k12frame.arduino $name.k12frame.math_1 $name.k12frame.math_2 $name.k12frame.math_3 $name.k12frame.logic $name.k12frame.other -side top -expand 0 -fill x + } +} + +proc pdtk_k12_show_sound_icons {name} { + $name.k12frame.datasound.data configure -image i.data + $name.k12frame.datasound.sound configure -image i.sound_on + catch { + pack forget $name.k12frame.wii $name.k12frame.arduino $name.k12frame.math_1 $name.k12frame.math_2 $name.k12frame.math_3 $name.k12frame.logic $name.k12frame.other + pack $name.k12frame.signal_1 $name.k12frame.signal_2 $name.k12frame.signal_3 $name.k12frame.instr $name.k12frame.fx $name.k12frame.output -side top -expand 0 -fill x + } +} + ############# pdtk_canvas_new -- create a new canvas ############### proc pdtk_canvas_new {name width height geometry editable} { global pd_tearoff put_tearoff @@ -2376,11 +2401,23 @@ proc pdtk_canvas_new {name width height geometry editable} { } pack $name.k12frame.edit.b -side left -expand 1 -padx 1 -pady 0 setTooltip $name.k12frame.edit.b "Toggle between building and playing an instrument" + pdtk_standardkeybindings $name.k12frame.edit.b + + # ---------------------------------- DATA VS SOUND BUTTONS ---------------------------------- + match_linux_wm [list frame $name.k12frame.datasound -relief flat] + match_linux_wm [list button $name.k12frame.datasound.data -text "DATA" -image i.data_on -command [concat pdtk_k12_show_data_icons $name]] + match_linux_wm [list button $name.k12frame.datasound.sound -text "SOUND" -image i.sound -command [concat pdtk_k12_show_sound_icons $name]] + pack $name.k12frame.datasound.data $name.k12frame.datasound.sound -side left -pady 1 -padx 1 -expand 0 + setTooltip $name.k12frame.datasound.data "Show DATA objects" + setTooltip $name.k12frame.datasound.sound "Show SOUND objects" + pdtk_standardkeybindings $name.k12frame.datasound.data + pdtk_standardkeybindings $name.k12frame.datasound.sound # ---------------------------------- MESSAGES LABEL ----------------------------------------- - match_linux_wm [list frame $name.k12frame.msgs -relief flat] - match_linux_wm [list label $name.k12frame.msgs.label -relief flat -text "MESSAGES"] - pack $name.k12frame.msgs.label -fill x -pady 0 -padx 1 + + #match_linux_wm [list frame $name.k12frame.msgs -relief flat] + #match_linux_wm [list label $name.k12frame.msgs.label -relief flat -text "MESSAGES"] + #pack $name.k12frame.msgs.label -fill x -pady 0 -padx 1 # ---------------------------------- WII ----------------------------------------- match_linux_wm [list frame $name.k12frame.wii -relief flat] @@ -2397,6 +2434,10 @@ proc pdtk_canvas_new {name width height geometry editable} { setTooltip $name.k12frame.wii.b_wii_buttons "Wiimote Buttons: Use this to select which Wiimote button should activate objects connected to this object" setTooltip $name.k12frame.wii.b_wii_hit "Wiimote Hit: Use this to detect when the wiimote has been shaken" setTooltip $name.k12frame.wii.b_wii_speed "Wiimote Speed: Use this to detect how quickly is Wiimote moving" + pdtk_standardkeybindings $name.k12frame.wii.b_wii_connect + pdtk_standardkeybindings $name.k12frame.wii.b_wii_buttons + pdtk_standardkeybindings $name.k12frame.wii.b_wii_speed + pdtk_standardkeybindings $name.k12frame.wii.b_wii_hit # ---------------------------------- ARDUINO ----------------------------------------- match_linux_wm [list frame $name.k12frame.arduino -relief flat] @@ -2416,25 +2457,38 @@ proc pdtk_canvas_new {name width height geometry editable} { setTooltip $name.k12frame.arduino.b_sarcduino_analog "Arduino Analog: Use this to monitor analog sensor speed" setTooltip $name.k12frame.arduino.b_sarcduino_hit "Arduino Hit: Use this to detect when the arduino analog sensor data has rapidly changed" setTooltip $name.k12frame.arduino.b_sarcduino_piezo "Arduino Piezo: Use this to analyze data coming from a piezo microphone sensor" + pdtk_standardkeybindings $name.k12frame.arduino.b_sarcduino + pdtk_standardkeybindings $name.k12frame.arduino.b_sarcduino_digital + pdtk_standardkeybindings $name.k12frame.arduino.b_sarcduino_analog + pdtk_standardkeybindings $name.k12frame.arduino.b_sarcduino_hit + pdtk_standardkeybindings $name.k12frame.arduino.b_sarcduino_piezo # ---------------------------------- MATH ROW 1 ----------------------------------------- match_linux_wm [list frame $name.k12frame.math_1 -relief flat] #match_linux_wm [list button $name.k12frame.math_1.b_sarcduino_net -image i.sarcduino_net \ # -command [concat put_K12_objects $name sarcduino_net]] - match_linux_wm [list button $name.k12frame.math_1.b_preset -image i.preset \ - -command [concat put_K12_objects $name preset]] match_linux_wm [list button $name.k12frame.math_1.b_math_number -image i.math_number \ -command [concat put_K12_objects $name math_number]] - match_linux_wm [list button $name.k12frame.math_1.b_math_average -image i.math_average \ - -command [concat put_K12_objects $name math_average]] - match_linux_wm [list button $name.k12frame.math_1.b_math_random -image i.math_random \ - -command [concat put_K12_objects $name math_random]] - pack $name.k12frame.math_1.b_preset $name.k12frame.math_1.b_math_number $name.k12frame.math_1.b_math_average $name.k12frame.math_1.b_math_random -side left -expand 0 -padx 1 -pady 1 + match_linux_wm [list button $name.k12frame.math_1.b_math_netsend -image i.math_netsend \ + -command [concat put_K12_objects $name math_netsend]] + match_linux_wm [list button $name.k12frame.math_1.b_math_netreceive -image i.math_netreceive \ + -command [concat put_K12_objects $name math_netreceive]] + match_linux_wm [list button $name.k12frame.math_1.b_math_tag -image i.math_tag \ + -command [concat put_K12_objects $name math_tag]] + match_linux_wm [list button $name.k12frame.math_1.b_math_routebytag -image i.math_routebytag \ + -command [concat put_K12_objects $name math_routebytag]] + pack $name.k12frame.math_1.b_math_number $name.k12frame.math_1.b_math_netsend $name.k12frame.math_1.b_math_netreceive $name.k12frame.math_1.b_math_tag $name.k12frame.math_1.b_math_routebytag -side left -expand 0 -padx 1 -pady 1 #setTooltip $name.k12frame.math_1.b_sarcduino_net "Arduino Net: Use this to retrieve data from arduino devices connected via network" - setTooltip $name.k12frame.math_1.b_preset "Preset: Use this to store and recall up to four different states of your instrument" setTooltip $name.k12frame.math_1.b_math_number "Number: Use this to assign a value to other objects" - setTooltip $name.k12frame.math_1.b_math_average "Average: Use this to calculate average from a stream of numbers" - setTooltip $name.k12frame.math_1.b_math_random "Random: Use this to generate random numbers" + setTooltip $name.k12frame.math_1.b_math_netsend "Netsend: Use this to send data over network to another computer" + setTooltip $name.k12frame.math_1.b_math_netreceive "Netreceive: Use this to receive data from another computer over network" + setTooltip $name.k12frame.math_1.b_math_tag "Tag: Use this to tag data to be sent over network" + setTooltip $name.k12frame.math_1.b_math_routebytag "Route By Tag: Use this to filter incoming network data by tag" + pdtk_standardkeybindings $name.k12frame.math_1.b_math_number + pdtk_standardkeybindings $name.k12frame.math_1.b_math_netsend + pdtk_standardkeybindings $name.k12frame.math_1.b_math_netreceive + pdtk_standardkeybindings $name.k12frame.math_1.b_math_tag + pdtk_standardkeybindings $name.k12frame.math_1.b_math_routebytag # ---------------------------------- MATH ROW 2 ----------------------------------------- match_linux_wm [list frame $name.k12frame.math_2 -relief flat] @@ -2446,51 +2500,98 @@ proc pdtk_canvas_new {name width height geometry editable} { -command [concat put_K12_objects $name math_multiply]] match_linux_wm [list button $name.k12frame.math_2.b_math_divide -image i.math_divide \ -command [concat put_K12_objects $name math_divide]] - match_linux_wm [list button $name.k12frame.math_2.b_math_scale -image i.math_scale \ - -command [concat put_K12_objects $name math_scale]] - pack $name.k12frame.math_2.b_math_add $name.k12frame.math_2.b_math_subtract $name.k12frame.math_2.b_math_multiply $name.k12frame.math_2.b_math_divide $name.k12frame.math_2.b_math_scale -side left -expand 0 -padx 1 -pady 1 + match_linux_wm [list button $name.k12frame.math_2.b_math_random -image i.math_random \ + -command [concat put_K12_objects $name math_random]] + pack $name.k12frame.math_2.b_math_add $name.k12frame.math_2.b_math_subtract $name.k12frame.math_2.b_math_multiply $name.k12frame.math_2.b_math_divide $name.k12frame.math_2.b_math_random -side left -expand 0 -padx 1 -pady 1 setTooltip $name.k12frame.math_2.b_math_add "Add: Use this to add two values" setTooltip $name.k12frame.math_2.b_math_subtract "Subtract: Use this to subtract two values" setTooltip $name.k12frame.math_2.b_math_multiply "Multiply: Use this to multiply two values" setTooltip $name.k12frame.math_2.b_math_divide "Divide: Use this to divide two values" - setTooltip $name.k12frame.math_2.b_math_scale "Scale: Use this to scale incoming values to a new range and direction" + setTooltip $name.k12frame.math_2.b_math_random "Random: Use this to generate random numbers" + pdtk_standardkeybindings $name.k12frame.math_2.b_math_add + pdtk_standardkeybindings $name.k12frame.math_2.b_math_subtract + pdtk_standardkeybindings $name.k12frame.math_2.b_math_multiply + pdtk_standardkeybindings $name.k12frame.math_2.b_math_divide + pdtk_standardkeybindings $name.k12frame.math_2.b_math_random + + # ---------------------------------- MATH ROW 3 ----------------------------------------- + match_linux_wm [list frame $name.k12frame.math_3 -relief flat] + match_linux_wm [list button $name.k12frame.math_3.b_math_average -image i.math_average \ + -command [concat put_K12_objects $name math_average]] + match_linux_wm [list button $name.k12frame.math_3.b_math_scale -image i.math_scale \ + -command [concat put_K12_objects $name math_scale]] + pack $name.k12frame.math_3.b_math_average $name.k12frame.math_3.b_math_scale -side left -expand 0 -padx 1 -pady 1 + setTooltip $name.k12frame.math_3.b_math_average "Average: Use this to calculate average from a stream of numbers" + setTooltip $name.k12frame.math_3.b_math_scale "Scale: Use this to scale incoming values to a new range and direction" + pdtk_standardkeybindings $name.k12frame.math_3.b_math_average + pdtk_standardkeybindings $name.k12frame.math_3.b_math_scale # ---------------------------------- LOGIC ----------------------------------------- match_linux_wm [list frame $name.k12frame.logic -relief flat] match_linux_wm [list button $name.k12frame.logic.b_logic_compare -image i.logic_compare \ -command [concat put_K12_objects $name logic_compare]] - #match_linux_wm [list button $name.k12frame.logic.b_logic_mapper -image i.logic_mapper \ - # -command [concat put_K12_objects $name logic_mapper]] + match_linux_wm [list button $name.k12frame.logic.b_logic_mapper -image i.logic_mapper \ + -command [concat put_K12_objects $name logic_mapper]] match_linux_wm [list button $name.k12frame.logic.b_logic_metronome -image i.logic_metronome \ -command [concat put_K12_objects $name logic_metronome]] match_linux_wm [list button $name.k12frame.logic.b_logic_counter -image i.logic_counter \ -command [concat put_K12_objects $name logic_counter]] match_linux_wm [list button $name.k12frame.logic.b_logic_sequencer -image i.logic_sequencer \ -command [concat put_K12_objects $name logic_sequencer]] - pack $name.k12frame.logic.b_logic_compare $name.k12frame.logic.b_logic_metronome $name.k12frame.logic.b_logic_counter $name.k12frame.logic.b_logic_sequencer -side left -expand 0 -padx 1 -pady 1 + pack $name.k12frame.logic.b_logic_compare $name.k12frame.logic.b_logic_mapper $name.k12frame.logic.b_logic_metronome $name.k12frame.logic.b_logic_counter $name.k12frame.logic.b_logic_sequencer -side left -expand 0 -padx 1 -pady 1 setTooltip $name.k12frame.logic.b_logic_compare "Compare: Use this to compare two values" - #setTooltip $name.k12frame.logic.b_logic_mapper "Mapper: Use this to map one value to two different but related values" + setTooltip $name.k12frame.logic.b_logic_mapper "Mapper: Use this to map one value to two different but related values" setTooltip $name.k12frame.logic.b_logic_metronome "Metronome: Use this to create a steady pulse" setTooltip $name.k12frame.logic.b_logic_counter "Counter: Use this to count events" setTooltip $name.k12frame.logic.b_logic_sequencer "Sequencer: Use this to map values to MIDI pitches" + pdtk_standardkeybindings $name.k12frame.logic.b_logic_compare + pdtk_standardkeybindings $name.k12frame.logic.b_logic_mapper + pdtk_standardkeybindings $name.k12frame.logic.b_logic_metronome + pdtk_standardkeybindings $name.k12frame.logic.b_logic_counter + pdtk_standardkeybindings $name.k12frame.logic.b_logic_sequencer + + # ---------------------------------- OTHER ----------------------------------------- + match_linux_wm [list frame $name.k12frame.other -relief flat] + match_linux_wm [list button $name.k12frame.other.b_preset -image i.preset \ + -command [concat put_K12_objects $name preset]] + match_linux_wm [list button $name.k12frame.other.b_comment -image i.comment \ + -command [concat menu_comment $name 1]] + pack $name.k12frame.other.b_preset $name.k12frame.other.b_comment -side left -expand 0 -padx 1 -pady 1 + setTooltip $name.k12frame.other.b_preset "Preset: Use this to store and recall up to four different states of your instrument" + setTooltip $name.k12frame.other.b_comment "Comment: Use this to post comments inside your patch" + pdtk_standardkeybindings $name.k12frame.other.b_preset + pdtk_standardkeybindings $name.k12frame.other.b_comment # ---------------------------------- SOUND LABEL ----------------------------------------- - match_linux_wm [list frame $name.k12frame.sound -relief flat] - match_linux_wm [list label $name.k12frame.sound.label -relief flat -text "SOUND"] - pack $name.k12frame.sound.label -fill x -pady 0 -padx 1 + #match_linux_wm [list frame $name.k12frame.sound -relief flat] + #match_linux_wm [list label $name.k12frame.sound.label -relief flat -text "SOUND"] + #pack $name.k12frame.sound.label -fill x -pady 0 -padx 1 # ---------------------------------- SIGNAL ROW 1 ----------------------------------------- match_linux_wm [list frame $name.k12frame.signal_1 -relief flat] match_linux_wm [list button $name.k12frame.signal_1.b_signal_microphone -image i.signal_microphone \ -command [concat put_K12_objects $name signal_microphone]] + + match_linux_wm [list button $name.k12frame.signal_1.b_signal_netsend -image i.signal_netsend \ + -command [concat put_K12_objects $name signal_netsend]] + match_linux_wm [list button $name.k12frame.signal_1.b_signal_netreceive -image i.signal_netreceive \ + -command [concat put_K12_objects $name signal_netreceive]] + match_linux_wm [list button $name.k12frame.signal_1.b_signal_sampler -image i.signal_sampler \ -command [concat put_K12_objects $name signal_sampler]] - match_linux_wm [list button $name.k12frame.signal_1.b_signal_envelope -image i.signal_envelope \ - -command [concat put_K12_objects $name signal_envelope]] - pack $name.k12frame.signal_1.b_signal_microphone $name.k12frame.signal_1.b_signal_sampler $name.k12frame.signal_1.b_signal_envelope -side left -expand 0 -padx 1 -pady 1 + match_linux_wm [list button $name.k12frame.signal_1.b_signal_player -image i.signal_player \ + -command [concat put_K12_objects $name signal_player]] + pack $name.k12frame.signal_1.b_signal_microphone $name.k12frame.signal_1.b_signal_netsend $name.k12frame.signal_1.b_signal_netreceive $name.k12frame.signal_1.b_signal_sampler $name.k12frame.signal_1.b_signal_player -side left -expand 0 -padx 1 -pady 1 setTooltip $name.k12frame.signal_1.b_signal_microphone "Microphone: Use this to capture and monitor microphone input" - setTooltip $name.k12frame.signal_1.b_signal_sampler "Sampler: Use this to record audio from microphone and plaly it back in various ways" - setTooltip $name.k12frame.signal_1.b_signal_envelope "Envelope: Use this to shape sound loudness" + setTooltip $name.k12frame.signal_1.b_signal_netsend "Netsend Sound: Use this to send your sound over network to another computer" + setTooltip $name.k12frame.signal_1.b_signal_netreceive "Netreceive Sound: Use this to receive sound from another computer over network" + setTooltip $name.k12frame.signal_1.b_signal_sampler "Sampler: Use this to record audio from microphone and play it back in various ways" + setTooltip $name.k12frame.signal_1.b_signal_player "Player: Use this to play WAV files in various ways" + pdtk_standardkeybindings $name.k12frame.signal_1.b_signal_microphone + pdtk_standardkeybindings $name.k12frame.signal_1.b_signal_netsend + pdtk_standardkeybindings $name.k12frame.signal_1.b_signal_netreceive + pdtk_standardkeybindings $name.k12frame.signal_1.b_signal_sampler + pdtk_standardkeybindings $name.k12frame.signal_1.b_signal_player # ---------------------------------- SIGNAL ROW 2 ----------------------------------------- match_linux_wm [list frame $name.k12frame.signal_2 -relief flat] @@ -2502,11 +2603,19 @@ proc pdtk_canvas_new {name width height geometry editable} { -command [concat put_K12_objects $name signal_square]] match_linux_wm [list button $name.k12frame.signal_2.b_signal_triangle -image i.signal_triangle \ -command [concat put_K12_objects $name signal_triangle]] - pack $name.k12frame.signal_2.b_signal_sine $name.k12frame.signal_2.b_signal_saw $name.k12frame.signal_2.b_signal_square $name.k12frame.signal_2.b_signal_triangle -side left -expand 0 -padx 1 -pady 1 + match_linux_wm [list button $name.k12frame.signal_2.b_signal_envelope -image i.signal_envelope \ + -command [concat put_K12_objects $name signal_envelope]] + pack $name.k12frame.signal_2.b_signal_sine $name.k12frame.signal_2.b_signal_saw $name.k12frame.signal_2.b_signal_square $name.k12frame.signal_2.b_signal_triangle $name.k12frame.signal_2.b_signal_envelope -side left -expand 0 -padx 1 -pady 1 setTooltip $name.k12frame.signal_2.b_signal_sine "Sine: Use this to generate sine tone" setTooltip $name.k12frame.signal_2.b_signal_saw "Sawtooth: Use this to generate sawtooth tone" setTooltip $name.k12frame.signal_2.b_signal_square "Square: Use this to generate square tone" setTooltip $name.k12frame.signal_2.b_signal_triangle "Triangle: Use this to generate triangle tone" + setTooltip $name.k12frame.signal_2.b_signal_envelope "Envelope: Use this to shape sound loudness" + pdtk_standardkeybindings $name.k12frame.signal_2.b_signal_sine + pdtk_standardkeybindings $name.k12frame.signal_2.b_signal_saw + pdtk_standardkeybindings $name.k12frame.signal_2.b_signal_square + pdtk_standardkeybindings $name.k12frame.signal_2.b_signal_triangle + pdtk_standardkeybindings $name.k12frame.signal_2.b_signal_envelope # ---------------------------------- SIGNAL ROW 3 ----------------------------------------- match_linux_wm [list frame $name.k12frame.signal_3 -relief flat] @@ -2523,6 +2632,10 @@ proc pdtk_canvas_new {name width height geometry editable} { setTooltip $name.k12frame.signal_3.b_signal_pink "Pink: Use this to generate pink (softer) noise" setTooltip $name.k12frame.signal_3.b_signal_add "Signal Add: Use this to add two sounds (signals)" setTooltip $name.k12frame.signal_3.b_signal_multiply "Signal Multiply: Use this to multiply two sounds (signals)" + pdtk_standardkeybindings $name.k12frame.signal_3.b_signal_noise + pdtk_standardkeybindings $name.k12frame.signal_3.b_signal_pink + pdtk_standardkeybindings $name.k12frame.signal_3.b_signal_add + pdtk_standardkeybindings $name.k12frame.signal_3.b_signal_multiply # ---------------------------------- INSTRUMENTS ----------------------------------------- match_linux_wm [list frame $name.k12frame.instr -relief flat] @@ -2539,6 +2652,10 @@ proc pdtk_canvas_new {name width height geometry editable} { setTooltip $name.k12frame.instr.b_instr_short2 "Short Sound 2: Use this to produce short sounds like a single snare drum hit" setTooltip $name.k12frame.instr.b_instr_sustained1 "Sustained Sound 1: Use this to produce long sustained sound like a sound of a woodwind instrument" setTooltip $name.k12frame.instr.b_instr_sustained2 "Sustained Sound 2: Use this to produce long sustained sound like a sound of brass instrument" + pdtk_standardkeybindings $name.k12frame.instr.b_instr_short1 + pdtk_standardkeybindings $name.k12frame.instr.b_instr_short2 + pdtk_standardkeybindings $name.k12frame.instr.b_instr_sustained1 + pdtk_standardkeybindings $name.k12frame.instr.b_instr_sustained2 # ---------------------------------- F/X ----------------------------------------- match_linux_wm [list frame $name.k12frame.fx -relief flat] @@ -2552,6 +2669,9 @@ proc pdtk_canvas_new {name width height geometry editable} { setTooltip $name.k12frame.fx.b_fx_filter "Filter: Use this to make sound appear muffled or brighter" setTooltip $name.k12frame.fx.b_fx_multitap "Echo: Use this to make sound echo" setTooltip $name.k12frame.fx.b_fx_reverb "Reverb: Use this to make sound appear as if it is being played in a large space" + pdtk_standardkeybindings $name.k12frame.fx.b_fx_filter + pdtk_standardkeybindings $name.k12frame.fx.b_fx_multitap + pdtk_standardkeybindings $name.k12frame.fx.b_fx_reverb # ---------------------------------- OUTPUT/OTHER ----------------------------------------- @@ -2560,9 +2680,10 @@ proc pdtk_canvas_new {name width height geometry editable} { -command [concat put_K12_objects $name output]] pack $name.k12frame.output.b_output -side left -expand 0 -padx 1 -pady 1 setTooltip $name.k12frame.output.b_output "Output: Use this to send audio from computer into speakers" + pdtk_standardkeybindings $name.k12frame.output.b_output # ---------------------------------------- NOW PACK THEM ALL ----------------------------------------- - pack $name.k12frame.edit $name.k12frame.msgs $name.k12frame.wii $name.k12frame.arduino $name.k12frame.math_1 $name.k12frame.arduino $name.k12frame.math_2 $name.k12frame.logic $name.k12frame.sound $name.k12frame.signal_1 $name.k12frame.signal_2 $name.k12frame.signal_3 $name.k12frame.instr $name.k12frame.fx $name.k12frame.output -side top -expand 0 -fill x + pack $name.k12frame.edit $name.k12frame.datasound $name.k12frame.wii $name.k12frame.arduino $name.k12frame.math_1 $name.k12frame.math_2 $name.k12frame.math_3 $name.k12frame.logic $name.k12frame.other -side top -expand 0 -fill x } canvas $name.c -width $width -height $height -background $::canvas_color($name) \ @@ -2590,7 +2711,7 @@ proc pdtk_canvas_new {name width height geometry editable} { if { $k12_mode == 0 } { wm minsize $name 50 20 } else { - wm minsize $name 580 532 + wm minsize $name 580 372 } wm geometry $name $geometry # the file menu