Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/add_block_manual/add_block_manual.gml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function add_block_manual(argument0, argument1, argument2, argument3, argument4,
if (xx >= songs[song].enda) songs[song].enda = xx
if (yy >= songs[song].endb) songs[song].endb = yy

if (ins.loaded) play_sound(ins, key, vel, pan, pit)
if (ins.loaded) play_sound(ins, key, (songs[song].layervol[yy] / 100 ) * vel, (songs[song].layerstereo[yy] + pan) / 2, pit)
history_set(h_addblock, xx, yy, ins, key, vel, pan, pit)

var insname = songs[song].instrument_list[| ds_list_find_index(songs[song].instrument_list, ins)].name
Expand Down
2 changes: 1 addition & 1 deletion scripts/change_block_manual/change_block_manual.gml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function change_block_manual(argument0, argument1, argument2, argument3, argumen
songs[song].song_pit[xx, yy] = pit
}

if (ins.loaded) play_sound(ins, key, vel, pan, pit)
if (ins.loaded) play_sound(ins, key, (songs[song].layervol[yy] / 100 ) * vel, (songs[song].layerstereo[yy] + pan) / 2, pit)

var insname = songs[song].instrument_list[| ds_list_find_index(songs[song].instrument_list, ins)].name
if (insname = "Tempo Changer") {
Expand Down
1 change: 1 addition & 0 deletions scripts/control_create/control_create.gml
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ function control_create() {

mousewheel = 0
changepitch = 1
layerhov_vppreview = 0

keynames = ["A", "A#", "B", "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#"];
keynames_flat = 0
Expand Down
44 changes: 38 additions & 6 deletions scripts/control_draw/control_draw.gml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
function control_draw() {
// control_draw()
var a, b, c, d, e, f, g, p, l, s, exist, str, str2, m, xx, x1, y1, x2, y2, iconcolor, showmenu, totalcols, totalrows, compx, prev, colr, note_offset;
var a, b, c, d, e, f, g, p, l, s, exist, str, str2, m, xx, x1, y1, x2, y2, iconcolor, showmenu, totalcols, totalrows, compx, prev, colr, note_offset,
preview_pan = 100, preview_vol = 100;

var checkplaying = playing - playing_prev
playing_prev = playing
Expand Down Expand Up @@ -232,15 +233,29 @@ function control_draw() {
selected_vel = 100
selected_pan = 100
selected_pit = 0
play_sound(current_song.instrument, selected_key, 100 ,100, 0)

preview_vol = (selby >= 0 && selby <= current_song.endb && layerhov_vppreview)
? (songs[song].layervol[selby] / 100 ) * selected_vel : 100

preview_pan = (selby >= 0 && selby <= current_song.endb && layerhov_vppreview)
? (songs[song].layerstereo[selby] + selected_pan) / 2 : 100

play_sound(current_song.instrument, selected_key, preview_vol, preview_pan, 0)
}
if (mouse_wheel_up_dynamic() && insindex < ds_list_size(current_song.instrument_list) - 1) {
insindex++
current_song.instrument = current_song.instrument_list[| insindex]
selected_vel = 100
selected_pan = 100
selected_pit = 0
play_sound(current_song.instrument, selected_key, 100 ,100, 0)

preview_vol = (selby >= 0 && selby <= current_song.endb && layerhov_vppreview)
? (songs[song].layervol[selby] / 100 ) * selected_vel : 100

preview_pan = (selby >= 0 && selby <= current_song.endb && layerhov_vppreview)
? (songs[song].layerstereo[selby] + selected_pan) / 2 : 100

play_sound(current_song.instrument, selected_key, preview_vol, preview_pan, 0)
}
}
if (mousewheel = 2 && window = 0 && (exist = 0 || changepitch = 0) && !isplayer && !volume_scroll) {
Expand All @@ -249,14 +264,28 @@ function control_draw() {
selected_vel = 100
selected_pan = 100
selected_pit = 0
play_sound(current_song.instrument, selected_key, 100 ,100, 0)

preview_vol = (selby >= 0 && selby <= current_song.endb && layerhov_vppreview)
? (songs[song].layervol[selby] / 100 ) * selected_vel : 100

preview_pan = (selby >= 0 && selby <= current_song.endb && layerhov_vppreview)
? (songs[song].layerstereo[selby] + selected_pan) / 2 : 100

play_sound(current_song.instrument, selected_key, preview_vol, preview_pan, 0)
}
if (mouse_wheel_up_dynamic() && selected_key < 87) {
selected_key += 1
selected_vel = 100
selected_pan = 100
selected_pit = 0
play_sound(current_song.instrument, selected_key, 100 ,100, 0)

preview_vol = (selby >= 0 && selby <= current_song.endb && layerhov_vppreview)
? (songs[song].layervol[selby] / 100 ) * selected_vel : 100

preview_pan = (selby >= 0 && selby <= current_song.endb && layerhov_vppreview)
? (songs[song].layerstereo[selby] + selected_pan) / 2 : 100

play_sound(current_song.instrument, selected_key, preview_vol, preview_pan, 0)
}
}

Expand Down Expand Up @@ -475,12 +504,15 @@ function control_draw() {
selected_vel = current_song.song_vel[selbx, selby]
selected_pan = current_song.song_pan[selbx, selby]
selected_pit = current_song.song_pit[selbx, selby]

preview_vol = (songs[song].layervol[selby] / 100 ) * selected_vel
preview_pan = (songs[song].layerstereo[selby] + selected_pan) / 2
} else {
selected_vel = 100
selected_pan = 100
selected_pit = 0
}
play_sound(current_song.instrument, selected_key, selected_vel, selected_pan, selected_pit)
play_sound(current_song.instrument, selected_key, preview_vol, preview_pan, selected_pit)
}

}
Expand Down
2 changes: 2 additions & 0 deletions scripts/draw_window_preferences/draw_window_preferences.gml
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ function draw_window_preferences() {
if (draw_radiobox(x1 + 40, y1 + 110 + (theme = 3) * 22, mousewheel = 1, "Use mouse wheel to change instrument", "Use the mouse wheel to toggle between\nthe available instruments.")) mousewheel = 1
if (draw_radiobox(x1 + 40, y1 + 130 + (theme = 3) * 22, mousewheel = 2, "Use mouse wheel to change key", "Use the mouse wheel to toggle\nbetween the keys on the piano.")) mousewheel = 2
if (draw_checkbox(x1 + 40, y1 + 158 + (theme = 3) * 22, changepitch, "Change note properties when scrolling over notes", "Whether scrolling when hovering over a note should change its key,\nvelocity, panning or pitch, according to the currently selected edit mode.")) changepitch=!changepitch
if (draw_checkbox(x1 + 40, y1 + 178 + (theme = 3) * 22, layerhov_vppreview , "Volume/Panning preview relative to current hovered layer", "Whether the volume/panning preview should be relative\nto the layer you are hovering over.")) layerhov_vppreview =!layerhov_vppreview
//draw_text_dynamic(x1 + 40, y1 + 178, "Tip: Hold Shift while scrolling over a note to change a whole octave,\nor fine-tune its velocity, panning or pitch.")
if (theme = 3) draw_theme_font(font_info_med)
draw_areaheader(x1 + 22, y1 + 220 + (theme = 3) * 22, 456, 105, "Piano")
Expand All @@ -549,6 +550,7 @@ function draw_window_preferences() {
if (draw_radiobox(x1 + 40, y1 + 110 + (theme = 3) * 22, mousewheel = 1, "使用鼠标滚轮改变音色", "使用鼠标滚轮切换可用音色。")) mousewheel = 1
if (draw_radiobox(x1 + 40, y1 + 130 + (theme = 3) * 22, mousewheel = 2, "使用鼠标滚轮改变音调", "使用鼠标滚轮改变目前使用的音调。")) mousewheel = 2
if (draw_checkbox(x1 + 40, y1 + 158 + (theme = 3) * 22, changepitch, "当在音符上使用鼠标滚轮改变音符属性", "在音符上使用鼠标滚轮时是否根据目前模式改变其音调、音量、声道或音高。")) changepitch=!changepitch
if (draw_checkbox(x1 + 40, y1 + 178 + (theme = 3) * 22, layerhov_vppreview , "相对于当前悬停图层的音量/平移预览", "音量/平移预览是否应相对于鼠标悬停的图层。")) layerhov_vppreview =!layerhov_vppreview
//draw_text_dynamic(x1 + 40, y1 + 178, "Tip: Hold Shift while scrolling over a note to change a whole octave,\nor fine-tune its velocity, panning or pitch.")
if (theme = 3) draw_theme_font(font_info_med)
draw_areaheader(x1 + 22, y1 + 220 + (theme = 3) * 22, 456, 105, "琴键")
Expand Down
1 change: 1 addition & 0 deletions scripts/load_settings/load_settings.gml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function load_settings() {
show_outofrange = ini_read_real( "preferences", "show_outofrange", show_outofrange)
mousewheel = ini_read_real( "preferences", "mousewheel", mousewheel)
changepitch = ini_read_real( "preferences", "change_pitch", changepitch)
layerhov_vppreview = ini_read_real( "preferences", "layerhov_vppreview", layerhov_vppreview)
select_lastpressed = ini_read_real( "preferences", "select_lastpressed", select_lastpressed)
marker_follow = ini_read_real( "preferences", "marker_follow", marker_follow)
marker_pagebypage = ini_read_real( "preferences", "marker_pagebypage", marker_pagebypage)
Expand Down
1 change: 1 addition & 0 deletions scripts/save_settings/save_settings.gml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function save_settings() {
ini_write_real_clean("preferences", "show_outofrange", show_outofrange)
ini_write_real_clean("preferences", "mousewheel", mousewheel)
ini_write_real_clean("preferences", "change_pitch", changepitch)
ini_write_real_clean("preferences", "layerhov_vppreview", layerhov_vppreview)
ini_write_real_clean("preferences", "select_lastpressed", select_lastpressed)
ini_write_real_clean("preferences", "marker_follow", marker_follow)
ini_write_real_clean("preferences", "marker_pagebypage", marker_pagebypage)
Expand Down