fix chart parsing
This commit is contained in:
1 parent
002ff7b1ff
commit
41d2576e58
4 files changed
+35
-12
No files matched your search
@@ -8,6 +8,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Godot;
|
||||
|
||||
namespace WacK.Data.Mer
|
||||
{
|
||||
@@ -133,7 +134,8 @@ namespace WacK.Data.Mer
|
||||
notes[currentMeasure].Add((currentBeat, new MerNote(value: tokens[3], type: MerType.Tempo)));
|
||||
break;
|
||||
case "3": // beats per measure
|
||||
notes[currentMeasure].Add((currentBeat, new MerNote(value: $"{tokens[3]} {tokens[4]}", type: MerType.TimeSignature)));
|
||||
string de = tokens.Count >= 5 ? tokens[4] : "4"; // TODO: use previously-estbalished denominator?
|
||||
notes[currentMeasure].Add((currentBeat, new MerNote(value: $"{tokens[3]} {de}", type: MerType.TimeSignature)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user