@@ -292,21 +292,33 @@ function control_draw() {
292292 if (mouse_wheel_down () && insindex > 0 ) {
293293 insindex--
294294 instrument = instrument_list[| insindex]
295+ selected_vel = 100
296+ selected_pan = 100
297+ selected_pit = 0
295298 play_sound (instrument, selected_key, 100 ,100 , 0 )
296299 }
297300 if (mouse_wheel_up () && insindex < ds_list_size (instrument_list) - 1 ) {
298301 insindex++
299302 instrument = instrument_list[| insindex]
303+ selected_vel = 100
304+ selected_pan = 100
305+ selected_pit = 0
300306 play_sound (instrument, selected_key, 100 ,100 , 0 )
301307 }
302308 }
303309 if (mousewheel = 2 && window = 0 && (exist = 0 || changepitch = 0 ) && !isplayer && !volume_scroll) {
304310 if (mouse_wheel_down () && selected_key > 0 ) {
305311 selected_key -= 1
312+ selected_vel = 100
313+ selected_pan = 100
314+ selected_pit = 0
306315 play_sound (instrument, selected_key, 100 ,100 , 0 )
307316 }
308317 if (mouse_wheel_up () && selected_key < 87 ) {
309318 selected_key += 1
319+ selected_vel = 100
320+ selected_pan = 100
321+ selected_pit = 0
310322 play_sound (instrument, selected_key, 100 ,100 , 0 )
311323 }
312324 }
@@ -519,11 +531,11 @@ function control_draw() {
519531 if (selected = 0 ) {
520532 if (dontplace = 0 ) {
521533 if (exist = 1 ) {
522- change_block_manual (selbx, selby, instrument, selected_key, 100 , 100 , 0 )
534+ change_block_manual (selbx, selby, instrument, selected_key, selected_vel, selected_pan, selected_pit )
523535 } else {
524- add_block_manual (starta + sela, startb + selb, instrument, selected_key, 100 , 100 , 0 )
536+ add_block_manual (starta + sela, startb + selb, instrument, selected_key, selected_vel, selected_pan, selected_pit )
525537 draw_set_halign (fa_center)
526- draw_block (x1 + 2 + 32 * sela, y1 + 34 + 32 * selb, instrument, selected_key, 100 , 100 , 0 , 0.5 , 0 )
538+ draw_block (x1 + 2 + 32 * sela, y1 + 34 + 32 * selb, instrument, selected_key, selected_vel, selected_pan, selected_pit , 0.5 , 0 )
527539 draw_theme_color ()
528540 draw_set_halign (fa_left)
529541 draw_set_alpha (1 )
@@ -538,7 +550,16 @@ function control_draw() {
538550 if (exist = 1 ) {
539551 selected_key = song_key[selbx, selby]
540552 instrument = song_ins[selbx, selby]
541- play_sound (instrument, selected_key, 100 , 100 , 0 )
553+ if (keyboard_check (vk_control)) {
554+ selected_vel = song_vel[selbx, selby]
555+ selected_pan = song_pan[selbx, selby]
556+ selected_pit = song_pit[selbx, selby]
557+ } else {
558+ selected_vel = 100
559+ selected_pan = 100
560+ selected_pit = 0
561+ }
562+ play_sound (instrument, selected_key, selected_vel, selected_pan, selected_pit)
542563 }
543564
544565 }
@@ -776,6 +797,9 @@ function control_draw() {
776797 for (a = 1 ; a <= 9 ; a++) {
777798 if (keyboard_check_pressed (ord (string (a % 10 )))) {
778799 instrument = instrument_list[| a - 1 ]
800+ selected_vel = 100
801+ selected_pan = 100
802+ selected_pit = 0
779803 play_sound (instrument, selected_key, 100 ,100 , 0 )
780804 }
781805 }
@@ -784,6 +808,9 @@ function control_draw() {
784808 for (a = 1 ; a <= 7 ; a++) {
785809 if (keyboard_check_pressed (ord (string (a % 10 )))) {
786810 instrument = instrument_list[| a + 8 ]
811+ selected_vel = 100
812+ selected_pan = 100
813+ selected_pit = 0
787814 play_sound (instrument, selected_key, 100 ,100 , 0 )
788815 }
789816 }
@@ -1726,6 +1753,9 @@ function control_draw() {
17261753 if (draw_icon_insbox (insindex, xx + b * 25 , yy + a * 25 , condstr (language != 1 , " Change instrument to " , " 更改音色为" ) + ins.name , true , false , instrument = ins)) {
17271754 play_sound (ins, selected_key, 100 , 100 , 0 )
17281755 instrument = ins
1756+ selected_vel = 100
1757+ selected_pan = 100
1758+ selected_pit = 0
17291759 // Set the first instrument of the collapsed row
17301760 insbox_start = min (floor (insindex / ins_icons) * ins_icons, ds_list_size (instrument_list) - ins_icons)
17311761 }
@@ -1758,6 +1788,9 @@ function control_draw() {
17581788 if (draw_icon_insbox (a, xx, yy, condstr (language != 1 , " Change instrument to " , " 更改音色为" ) + ins.name , false , false , instrument = ins)) {
17591789 play_sound (ins, selected_key, 100 , 100 , 0 )
17601790 instrument = ins
1791+ selected_vel = 100
1792+ selected_pan = 100
1793+ selected_pit = 0
17611794 }
17621795 xx += 25
17631796 }
@@ -1907,6 +1940,26 @@ function control_draw() {
19071940 else {draw_text_dynamic (xx, rh - 18 , " 音: " + get_keyname (selected_key, 1 )) xx += 75 }
19081941 draw_separator (xx, rh - 20 )
19091942 draw_theme_color ()
1943+
1944+ if (selected_vel != 100 || selected_pan != 100 || selected_pit != 0 ) {
1945+ xx += 4
1946+ if (language != 1 ) {draw_text_dynamic (xx, rh - 18 , " Velovity: " + string (selected_vel)) xx += 100 }
1947+ else {draw_text_dynamic (xx, rh - 18 , " 音量: " + string (selected_vel)) xx += 100 }
1948+ draw_separator (xx, rh - 20 )
1949+ draw_theme_color ()
1950+
1951+ xx += 4
1952+ if (language != 1 ) {draw_text_dynamic (xx, rh - 18 , " Panning: " + string (selected_pan)) xx += 95 }
1953+ else {draw_text_dynamic (xx, rh - 18 , " 声道: " + string (selected_pan)) xx += 95 }
1954+ draw_separator (xx, rh - 20 )
1955+ draw_theme_color ()
1956+
1957+ xx += 4
1958+ if (language != 1 ) {draw_text_dynamic (xx, rh - 18 , " Pitch: " + string (selected_pit)) xx += 85 }
1959+ else {draw_text_dynamic (xx, rh - 18 , " 音高: " + string (selected_pit)) xx += 85 }
1960+ draw_separator (xx, rh - 20 )
1961+ draw_theme_color ()
1962+ }
19101963
19111964 xx += 4
19121965 if (language != 1 ) {draw_text_dynamic (xx, rh - 18 , " Tick: " + test (selbx = -1 , " None" , string (selbx))) xx += 90 }
0 commit comments