From a6b27a79f4e2b4b40a302902975d7c9ffc24c162 Mon Sep 17 00:00:00 2001 From: brunzelchen Date: Wed, 9 Dec 2009 22:02:26 +0000 Subject: - 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 --- Medley/src/base/USong.pas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Medley') 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; -- cgit v1.2.3