aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-12-09 22:02:26 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-12-09 22:02:26 +0000
commita6b27a79f4e2b4b40a302902975d7c9ffc24c162 (patch)
treebd626fc0f9a39a0fac42779b2640e589046d2cd4
parent4d45391b870ad2c9454ad8fc304de133f18a67eb (diff)
downloadusdx-a6b27a79f4e2b4b40a302902975d7c9ffc24c162.tar.gz
usdx-a6b27a79f4e2b4b40a302902975d7c9ffc24c162.tar.xz
usdx-a6b27a79f4e2b4b40a302902975d7c9ffc24c162.zip
- fixed bug: end of calculated medley-song was in some cases the first note of a new sentence
- changed min. medley-song length from 25 to 30 seconds git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2015 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Medley/src/base/USong.pas7
1 files changed, 4 insertions, 3 deletions
diff --git a/Medley/src/base/USong.pas b/Medley/src/base/USong.pas
index 8721cffb..4bc10cf1 100644
--- a/Medley/src/base/USong.pas
+++ b/Medley/src/base/USong.pas
@@ -1367,7 +1367,7 @@ end;
and the end... *}
procedure TSong.FindRefrainStart();
Const
- MEDLEY_MIN_DURATION = 25; //minimum duration of a medley in seconds
+ MEDLEY_MIN_DURATION = 30; //minimum duration of a medley-song in seconds
Type
TSeries = record
@@ -1446,8 +1446,9 @@ begin
if (Length(series)>0) and (series[max].len > 3) then
begin
Medley.StartBeat := Lines[0].Line[series[max].start].Note[0].Start;
- Medley.EndBeat := Lines[0].Line[series[max].end_].Note[0].Start +
- Lines[0].Line[series[max].end_].Note[0].Length;
+ len_notes := length(Lines[0].Line[series[max].end_].Note);
+ Medley.EndBeat := Lines[0].Line[series[max].end_].Note[len_notes-1].Start +
+ Lines[0].Line[series[max].end_].Note[len_notes-1].Length;
CurrentSong := self;
found_end := false;