Skip to content

Commit

Permalink
BUG FIX: When sustaining, it is no longer possible to have multiple c…
Browse files Browse the repository at this point in the history
…opies of the same note sounding at once.
  • Loading branch information
dhilowitz committed Jun 20, 2020
1 parent 61e46ea commit 78559d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Pianobook Piano Template v1.ksp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ on init
end on

function func_play_regular_note
if(%notes_playing[$func_play_note_midi_note] > 0)
fade_out(%notes_playing[$func_play_note_midi_note], 1000, 1)
end if

if(num_elements(%note_without_pedal_groups) <= 0)
exit
else
Expand Down Expand Up @@ -153,6 +157,10 @@ function func_play_regular_note
end function

function func_play_sustain_note
if(%notes_playing[$func_play_note_midi_note] > 0)
fade_out(%notes_playing[$func_play_note_midi_note], 1000, 1)
end if

if(num_elements(%note_with_pedal_groups) <= 0)
exit
else
Expand Down
Binary file modified src/Pianobook Piano Template v1.nki
Binary file not shown.

0 comments on commit 78559d4

Please sign in to comment.