diff --git a/BPMChange.cs b/BPMChange.cs
deleted file mode 100644
index 0e1b840..0000000
--- a/BPMChange.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-namespace MaichartConverter
-{
- ///
- /// BPMChange note for Simai
- ///
- public class BPMChange : Note
- {
-
- ///
- /// Construct Empty
- ///
- public BPMChange()
- {
- this.NoteType = "BPM";
- this.Key = "";
- this.Bar = 0;
- this.Tick = 0;
- this.BPM = 0;
- this.Update();
- }
-
- ///
- /// Construct BPMChange with given bar, tick, BPM
- ///
- /// Bar
- /// tick
- /// BPM
- public BPMChange(int bar, int startTime, double BPM)
- {
- this.Bar = bar;
- this.Tick = startTime;
- this.BPM = BPM;
- this.Update();
- }
-
- ///
- /// Construct BPMChange with take in value
- ///
- /// Take in BPMChange
- public BPMChange(BPMChange takeIn)
- {
- this.Bar = takeIn.Bar;
- this.Tick = takeIn.Tick;
- this.BPM = takeIn.BPM;
- this.Update();
- }
-
-
- public override bool CheckValidity()
- {
- return this.BPM != 0;
- }
-
- public override string Compose(int format)
- {
- string result = "";
- if (format == 0)
- {
- result += "(" + this.BPM + ")";
- //result += "(" + this.BPM + "_" + this.Bar + "_" + this.Tick + ")";
- }
- //else result += "(" + this.BPM + "_" + this.Bar + "_" + this.Tick + ")";
- return result;
- }
-
- public override string NoteGenre => "BPM";
-
- public override bool IsNote => true;
-
- public override string NoteSpecificType => "BPM";
-
- public override bool Equals(object? obj)
- {
- bool result = false;
- if (this == obj && this == null)
- {
- result = true;
- }
- else if (this!=null && obj != null)
- {
- BPMChange candidate = (BPMChange)obj;
- if (this.GetHashCode() == candidate.GetHashCode())
- {
- result = true;
- }
- else if (this.Bar == candidate.Bar)
- {
- if (this.Tick == candidate.Tick && this.BPM == candidate.BPM)
- {
- result = true;
- }
- }
- }
- return result;
- }
-
- public override int GetHashCode()
- {
- // string hash = this.Bar + "0" + this.Tick + "0" + this.BPM;
- // return int.Parse(hash);
- return base.GetHashCode();
- }
- }
-}
diff --git a/BPMChanges.cs b/BPMChanges.cs
deleted file mode 100644
index e726a47..0000000
--- a/BPMChanges.cs
+++ /dev/null
@@ -1,159 +0,0 @@
-using System.Dynamic;
-using System.Globalization;
-
-namespace MaichartConverter
-{
- public class BPMChanges
- {
- private HashSet changeNotes;
-
- ///
- /// Construct with changes listed
- ///
- /// Bar which contains changes
- /// Tick in bar contains changes
- /// Specified BPM changes
- public BPMChanges(List bar, List tick, List bpm)
- {
- this.changeNotes = new HashSet();
- for (int i = 0; i < bar.Count; i++)
- {
- BPMChange candidate = new(bar[i], tick[i], bpm[i]);
- changeNotes.Add(candidate);
- }
- this.Update();
- }
-
- ///
- /// Construct empty BPMChange List
- ///
- public BPMChanges()
- {
- this.changeNotes = new HashSet();
- this.Update();
- }
-
- ///
- /// Construct BPMChanges with existing one
- ///
- ///
- public BPMChanges(BPMChanges takenIn)
- {
- this.changeNotes = new HashSet();
- foreach (BPMChange candidate in takenIn.ChangeNotes)
- {
- this.changeNotes.Add(candidate);
- }
- }
-
- public List ChangeNotes
- {
- get
- {
- List result = new();
- result.AddRange(this.changeNotes);
- return result;
- }
- }
-
- ///
- /// Add BPMChange to change notes
- ///
- ///
- public void Add(BPMChange takeIn)
- {
- this.changeNotes.Add(takeIn);
- this.Update();
- }
-
- ///
- /// Compose change notes according to BPMChanges
- ///
- public void Update()
- {
- List adjusted = new();
- Note lastNote = new Rest();
- foreach (BPMChange x in this.changeNotes)
- {
- if (!(x.Bar == lastNote.Bar && x.Tick == lastNote.Tick && x.BPM == lastNote.BPM))
- {
- adjusted.Add(x);
- lastNote = x;
- }
- }
- // Console.WriteLine(adjusted.Count);
- this.changeNotes = new HashSet();
- foreach(BPMChange x in adjusted)
- {
- this.changeNotes.Add(x);
- }
- if (this.changeNotes.Count!=adjusted.Count)
- {
- throw new Exception("Adjusted BPM Note number not matching");
- }
- }
-
- ///
- /// Returns first definitions
- ///
- public string InitialChange
- {
- get
- {
- if (changeNotes.Count > 4)
- {
- string result = "BPM_DEF" + "\t";
- for (int x = 0; x < 4; x++)
- {
- result = result + String.Format("{0:F3}", this.ChangeNotes[x].BPM);
- result += "\t";
- }
- return result + "\n";
- }
- else
- {
- int times = 0;
- string result = "BPM_DEF" + "\t";
- foreach (BPMChange x in changeNotes)
- {
- result += String.Format("{0:F3}", x.BPM);
- result += "\t";
- times++;
- }
- while (times < 4)
- {
- result += String.Format("{0:F3}", this.ChangeNotes[0].BPM);
- result += "\t";
- times++;
- }
- return result + "\n";
- }
- }
- }
-
- ///
- /// See if the BPMChange is valid
- ///
- /// True if valid, false elsewise
- public bool CheckValidity()
- {
- bool result = true;
- return result;
- }
-
- ///
- /// Compose BPMChanges in beginning of MA2
- ///
- ///
- public string Compose()
- {
- string result = "";
- for (int i = 0; i < changeNotes.Count; i++)
- {
- result += "BPM" + "\t" + this.ChangeNotes[i].Bar + "\t" + this.ChangeNotes[i].Tick + "\t" + this.ChangeNotes[i].BPM + "\n";
- //result += "BPM" + "\t" + bar[i] + "\t" + tick[i] + "\t" + String.Format("{0:F3}", bpm[i])+"\n";
- }
- return result;
- }
- }
-}
diff --git a/Chart.cs b/Chart.cs
deleted file mode 100644
index c368cf0..0000000
--- a/Chart.cs
+++ /dev/null
@@ -1,927 +0,0 @@
-using System.Globalization;
-using System.Runtime.CompilerServices;
-
-namespace MaichartConverter
-{
-
- ///
- /// A class holding notes and information to form a chart
- ///
- public abstract class Chart : IChart
- {
- //Stores all notes
- private List notes;
-
- //Stores definitions of BPM Changes
- private BPMChanges bpmChanges;
-
- //Stores definitions of Measure Changes
- private MeasureChanges measureChanges;
-
- private int totalNoteNumber;
-
- //Counts number of Tap
- private int tapNumber;
-
- //Counts number of Break
- private int breakNumber;
-
- //Counts number of Hold
- private int holdNumber;
-
- //Counts number of Slide
- private int slideNumber;
-
- //Counts number of Touch
- private int touchNumber;
-
- //Counts number of Touch Hold
- private int thoNumber;
-
- //Defines if the chart is DX chart
- private bool isDxChart;
-
- ///
- /// The first note of the chart
- ///
- private Note? firstNote;
-
- //Defines
- private int[] unitScore = { 500, 1000, 1500, 2500 };
- private int achievement = 0;
- private int totalDelay = 0;
- private List> chart;
- private Dictionary information;
- private readonly string[] TapTypes = { "TAP", "STR", "TTP", "XTP", "XST" };
- private readonly string[] HoldTypes = { "HLD", "THO", "XHO" };
- private readonly string[] SlideTypes = { "SI_", "SV_", "SF_", "SCL", "SCR", "SUL", "SUR", "SLL", "SLR", "SXL", "SXR", "SSL", "SSR" };
-
- ///Theoretical Rating = (Difference in 100-down and Max score)/100-down
- ///
- /// Access to Notes
- ///
- public List Notes
- {
- get
- {
- return this.notes;
- }
- set
- {
- this.notes = value;
- }
- }
-
- ///
- /// Returns this.Chart. aka List of bars
- ///
- /// this.Chart
- public List> StoredChart
- {
- get
- {
- return this.chart;
- }
- set
- {
- this.chart = value;
- }
- }
-
- ///
- /// Access to BPM Changes
- ///
- public BPMChanges BPMChanges
- {
- get
- {
- return this.bpmChanges;
- }
- set
- {
- this.bpmChanges = value;
- }
- }
-
- ///
- /// Access to Measure Changes
- ///
- public MeasureChanges MeasureChanges
- {
- get
- {
- return this.measureChanges;
- }
- set
- {
- this.measureChanges = value;
- }
- }
-
- ///
- /// Access to Tap Number
- ///
- public int TapNumber
- {
- get
- {
- return this.tapNumber;
- }
- set
- {
- this.tapNumber = value;
- }
- }
-
- ///
- /// Access to Break Number
- ///
- public int BreakNumber
- {
- get
- {
- return this.breakNumber;
- }
- set
- {
- this.breakNumber = value;
- }
- }
-
- ///
- /// Access to Hold Number
- ///
- public int HoldNumber
- {
- get
- {
- return this.holdNumber;
- }
- set
- {
- this.holdNumber = value;
- }
- }
-
- ///
- /// Access to Slide Number
- ///
- public int SlideNumber
- {
- get
- {
- return this.slideNumber;
- }
- set
- {
- this.slideNumber = value;
- }
- }
-
- ///
- /// Access to Touch Number
- ///
- public int TouchNumber
- {
- get
- {
- return this.touchNumber;
- }
- set
- {
- this.touchNumber = value;
- }
- }
-
- ///
- /// Access to Touch Hold Number
- ///
- public int ThoNumber
- {
- get
- {
- return this.thoNumber;
- }
- set
- {
- this.thoNumber = value;
- }
- }
-
- ///
- /// Access to the total note number
- ///
- public int TotalNoteNumber
- {
- get { return this.totalNoteNumber; }
- }
-
- ///
- /// Access to Unit Score
- ///
- public int[] UnitScore
- {
- get
- {
- return this.unitScore;
- }
- }
-
- ///
- /// Access to theoretical Achievement
- ///
- public int Achievement
- {
- get
- {
- return this.achievement;
- }
- set
- {
- this.achievement = value;
- }
- }
-
- ///
- /// Return the total delayed value of this Chart.
- ///
- /// this.TotalDelayedValue
- public int TotalDelay
- {
- get
- {
- return this.totalDelay;
- }
- set
- {
- this.totalDelay = value;
- }
- }
-
- ///
- /// Return Information
- ///
- /// this.Information
- public Dictionary Information
- {
- get
- {
- return this.information;
- }
- set
- {
- this.information = value;
- }
- }
-
- public bool IsDXChart
- {
- get => this.isDxChart;
- set => this.isDxChart = value;
- }
-
- public Note? FirstNote
- {
- get => this.firstNote;
- set => this.firstNote = value;
- }
-
- ///
- /// Empty constructor
- ///
- public Chart()
- {
- this.notes = new List();
- this.bpmChanges = new BPMChanges();
- this.measureChanges = new MeasureChanges();
- this.chart = new List>();
- this.information = new Dictionary();
- this.isDxChart = false;
- }
-
- public abstract bool CheckValidity();
-
- ///
- /// Update properties in Good Brother for exporting
- ///
- public virtual void Update()
- {
- this.StoredChart = new List>();
- int maxBar = 0;
- double timeStamp = 0.0;
- if (notes.Count > 0)
- {
- maxBar = notes[notes.Count - 1].Bar;
- }
- for (int i = 0; i <= maxBar; i++)
- {
- List bar = new List();
- BPMChange noteChange = new BPMChange();
- double currentBPM = this.BPMChanges.ChangeNotes[0].BPM;
- Note lastNote = new Rest();
- Note realLastNote = new Rest();
- foreach (BPMChange x in this.BPMChanges.ChangeNotes)
- {
- if (x.Bar == i)
- {
- bar.Add(x);
- }
- }
- foreach (Note x in this.Notes)
- {
- if (this.FirstNote==null&&!(x.NoteType.Equals("BPM")||x.NoteType.Equals("MEASURE")))
- {
- this.FirstNote = x;
- // Console.WriteLine(x.Compose(0));
- }
- //x.BPMChangeNotes = this.bpmChanges.ChangeNotes;
- //x.Update();
- //x.TickTimeStamp = this.GetTimeStamp(x.TickStamp);
- //x.WaitTimeStamp = this.GetTimeStamp(x.WaitTickStamp);
- //x.LastTimeStamp = this.GetTimeStamp(x.LastTickStamp);
- if (x.Bar == i)
- {
- //x.ReplaceBPMChanges(this.bpmChanges);
- //x.BPMChangeNotes = this.bpmChanges.ChangeNotes;
- //x.Update();
- // Console.WriteLine("This note contains "+x.BPMChangeNotes.Count+" BPM notes");
- //Console.WriteLine(GetNoteDetail(this.bpmChanges, x));
- int delay = x.Bar * 384 + x.Tick + x.WaitLength + x.LastLength;
- switch (x.NoteSpecificType)
- {
- case "BPM":
- currentBPM = x.BPM;
- break;
- case "MEASURE":
- break;
- case "REST":
- break;
- case "TAP":
- this.tapNumber++;
- if (x.NoteSpecificType.Equals("XTP"))
- {
- this.isDxChart = false;
- }
- if (x.NoteType.Equals("TTP"))
- {
- this.touchNumber++;
- this.isDxChart = false;
- }
- else if (x.NoteType.Equals("BRK") || x.NoteType.Equals("BST"))
- {
- this.breakNumber++;
- }
- break;
- case "HOLD":
- this.holdNumber++;
- x.TickBPMDisagree = (GetBPMByTick(x.TickStamp) != GetBPMByTick(x.WaitTickStamp) || GetBPMByTick(x.WaitTickStamp) != GetBPMByTick(x.LastTickStamp) || GetBPMByTick(x.TickStamp) != GetBPMByTick(x.LastTickStamp));
- x.Update();
- if (delay > this.TotalDelay)
- {
- this.totalDelay = delay;
- //Console.WriteLine("New delay: " + delay);
- //Console.WriteLine(x.Compose(1));
- }
- if (x.NoteType.Equals("THO"))
- {
- this.thoNumber++;
- this.isDxChart = false;
- }
- break;
- case "SLIDE_START":
- this.tapNumber++;
- break;
- case "SLIDE":
- this.slideNumber++;
- x.TickBPMDisagree = (GetBPMByTick(x.TickStamp) != GetBPMByTick(x.WaitTickStamp) ||
- GetBPMByTick(x.WaitTickStamp) != GetBPMByTick(x.LastTickStamp) ||
- GetBPMByTick(x.TickStamp) != GetBPMByTick(x.LastTickStamp) ||
- HasBPMChangeInBetween(x.TickStamp, x.WaitTickStamp));
- x.Update();
- if (x.TickTimeStamp==0)
- {
- x.TickTimeStamp = this.GetTimeStamp(x.TickStamp);
- }
- if (x.CalculatedWaitTime ==0)
- {
- x.WaitTimeStamp = this.GetTimeStamp(x.WaitTickStamp);
- x.CalculatedWaitTime = x.WaitTimeStamp - x.TickTimeStamp;
- }
- if (x.CalculatedLastTime == 0)
- {
- x.LastTimeStamp = this.GetTimeStamp(x.LastTickStamp);
- x.CalculatedLastTime = x.LastTimeStamp - x.WaitTimeStamp;
- }
- if (lastNote.NoteSpecificType.Equals("SLIDE_START"))
- {
- x.SlideStart = lastNote;
- lastNote.ConsecutiveSlide = x;
- }
- if (delay > this.TotalDelay)
- {
- this.totalDelay = delay;
- //Console.WriteLine("New delay: "+delay);
- //Console.WriteLine(x.Compose(1));
- }
- break;
- default:
- break;
- }
- x.BPM = currentBPM;
- //if (x.NoteGenre.Equals("SLIDE") && !lastNote.NoteSpecificType.Equals("SLIDE_START"))
- //{
- // x.Prev = new Tap("NST", x.Bar, x.Tick, x.Key);
- // lastNote.Next = x.Prev;
- //}
- //else
- {
- lastNote.Next = x;
- x.Prev = lastNote;
- }
- x.Prev.Next = x;
- //if ((!x.NoteGenre.Equals("SLIDE")) && x.Prev.NoteType.Equals("STR")&&x.Prev.ConsecutiveSlide == null)
- //{
- // Console.WriteLine("Found NSS");
- // Console.WriteLine("This note's note type: " + x.NoteType);
- // Console.WriteLine(x.Compose(1));
- // Console.WriteLine("Prev note's note type: " + x.Prev.NoteType);
- // Console.WriteLine(x.Prev.Compose(1));
- // lastNote.NoteType = "NSS";
- // x.Prev.NoteType = "NSS";
- //}
- lastNote.Next = x;
- bar.Add(x);
- if (!x.NoteGenre.Equals("SLIDE"))
- {
- lastNote = x;
- }
- realLastNote = x;
- timeStamp += x.TickTimeStamp;
- }
- }
-
- List afterBar = new List();
- afterBar.Add(new MeasureChange(i, 0, CalculateQuaver(CalculateLeastMeasure(bar))));
- //Console.WriteLine();
- //Console.WriteLine("In bar "+i+", LeastMeasure is "+ CalculateLeastMeasure(bar)+", so quaver will be "+ CalculateQuaver(CalculateLeastMeasure(bar)));
- afterBar.AddRange(bar);
- this.chart.Add(FinishBar(afterBar, this.BPMChanges.ChangeNotes, i, CalculateQuaver(CalculateLeastMeasure(bar))));
- }
- //Console.WriteLine("TOTAL DELAY: "+this.TotalDelay);
- //Console.WriteLine("TOTAL COUNT: "+ this.chart.Count * 384);
- if (this.totalDelay < this.chart.Count * 384)
- {
- this.totalDelay = 0;
- }
- else
- {
- this.totalDelay -= this.chart.Count * 384;
- }
- this.totalNoteNumber += (this.tapNumber+this.holdNumber+this.slideNumber);
- }
-
- ///
- /// Compose chart in appropriate result.
- ///
- /// String of chart compiled
- public abstract string Compose();
-
- ///
- /// Override and compose with given arrays
- ///
- /// Override BPM array
- /// Override Measure array
- /// Good Brother with override array
- public abstract string Compose(BPMChanges bpm, MeasureChanges measure);
-
- ///
- /// Return the least none 0 measure of bar.
- ///
- /// bar to take in
- /// List none 0 measure
- public static int CalculateLeastMeasure(List bar)
- {
- List startTimeList = new List();
- startTimeList.Add(0);
- foreach (Note x in bar)
- {
- if (!startTimeList.Contains(x.Tick))
- {
- startTimeList.Add(x.Tick);
- }
- if (x.NoteType.Equals("BPM"))
- {
- //Console.WriteLine(x.Compose(0));
- }
- }
- if (startTimeList[startTimeList.Count - 1] != 384)
- {
- startTimeList.Add(384);
- }
- List intervalCandidates = new List();
- int minimalInterval = GCD(startTimeList[0], startTimeList[1]);
- for (int i = 1; i < startTimeList.Count; i++)
- {
- minimalInterval = GCD(minimalInterval, startTimeList[i]);
- }
- return minimalInterval;
- }
-
- ///
- /// Return note number except Rest, BPM and Measure.
- ///
- /// bar of note to take in
- /// Number
- public static int RealNoteNumber(List Bar)
- {
- int result = 0;
- foreach (Note x in Bar)
- {
- if (x.IsNote)
- {
- result++;
- }
- }
- return result;
- }
-
- ///
- /// Judges if this bar contains notes
- ///
- /// Bar to analyze on
- /// True if contains, false elsewise
- public static bool ContainNotes(List Bar)
- {
- bool result = false;
- foreach (Note x in Bar)
- {
- result = result || x.IsNote;
- }
- return result;
- }
-
- ///
- /// Generate appropriate length for hold and slide.
- ///
- /// Last Time
- /// [Definition:Length]=[Quaver:Beat]
- public static int CalculateQuaver(int length)
- {
- int result = 0;
- const int definition = 384;
- int divisor = GCD(definition, length);
- int quaver = definition / divisor, beat = length / divisor;
- result = quaver;
- return result;
- }
-
- ///
- /// Finish Bar writing byu adding specific rest note in between.
- ///
- /// Bar to finish with
- /// BPMChange Notes
- /// Bar number of Bar
- /// Minimal interval calculated from bar
- /// Finished bar
- public static List FinishBar(List bar, List bpmChanges, int barNumber, int minimalQuaver)
- {
- List result = new List();
- bool writeRest = true;
- result.Add(bar[0]);
- for (int i = 0; i < 384; i += 384 / minimalQuaver)
- {
- //Separate Touch and others to prevent ordering issue
- Note bpm = new Rest();
- List eachSet = new List();
- List touchEachSet = new List();
- //Set condition to write rest if appropriate
- writeRest = true;
- //Add Appropriate note into each set
- foreach (Note x in bar)
- {
- if ((x.Tick == i) && x.IsNote && !(x.NoteType.Equals("TTP") || x.NoteType.Equals("THO")))
- {
- if (x.NoteSpecificType.Equals("BPM"))
- {
- bpm = x;
- //List tempSet = new List();
- //tempSet.Add(x);
- //tempSet.AddRange(eachSet);
- //eachSet=tempSet;
- //Console.WriteLine("A note was found at tick " + i + " of bar " + barNumber + ", it is "+x.NoteType);
- }
- else
- {
- eachSet.Add(x);
- //Console.WriteLine("A note was found at tick " + i + " of bar " + barNumber + ", it is "+x.NoteType);
- writeRest = false;
- }
- }
- else if ((x.Tick == i) && x.IsNote && (x.NoteType.Equals("TTP") || x.NoteType.Equals("THO")))
- {
- if (x.NoteSpecificType.Equals("BPM"))
- {
- bpm = x;
- //Console.WriteLine("A note was found at tick " + i + " of bar " + barNumber + ", it is "+x.NoteType);
- }
- else
- {
- touchEachSet.Add(x);
- //Console.WriteLine("A note was found at tick " + i + " of bar " + barNumber + ", it is "+x.NoteType);
- writeRest = false;
- }
- }
- }
- //Searching for BPM change. If find one, get into front.
- if (bpm.BPM != 0)
- {
- List adjusted = new List();
- adjusted.Add(bpm);
- adjusted.AddRange(touchEachSet);
- adjusted.AddRange(eachSet);
- eachSet = adjusted;
- }
- else
- {
- List adjusted = new List();
- adjusted.AddRange(touchEachSet);
- adjusted.AddRange(eachSet);
- eachSet = adjusted;
- }
- if (writeRest)
- {
- //Console.WriteLine("There is no note at tick " + i + " of bar " + barNumber + ", Adding one");
- eachSet.Add(new Rest("RST", barNumber, i));
- }
- result.AddRange(eachSet);
- }
- if (RealNoteNumber(result) != RealNoteNumber(bar))
- {
- string error = "";
- error += ("Bar notes not match in bar: " + barNumber) + "\n";
- error += ("Expected: " + RealNoteNumber(bar)) + "\n";
- foreach (Note x in bar)
- {
- error += (x.Compose(1)) + "\n";
- }
- error += ("\nActual: " + RealNoteNumber(result)) + "\n";
- foreach (Note y in result)
- {
- error += (y.Compose(1)) + "\n";
- }
- Console.WriteLine(error);
- throw new Exception("NOTE NUMBER IS NOT MATCHING");
- }
- bool hasFirstBPMChange = false;
- List changedResult = new List();
- Note potentialFirstChange = new Rest();
- {
- for (int i = 0; !hasFirstBPMChange && i < result.Count(); i++)
- {
- if (result[i].NoteGenre.Equals("BPM") && result[i].Tick == 0)
- {
- changedResult.Add(result[i]);
- potentialFirstChange = result[i];
- hasFirstBPMChange = true;
- }
- }
- if (hasFirstBPMChange)
- {
- result.Remove(potentialFirstChange);
- changedResult.AddRange(result);
- result = changedResult;
- }
- }
-
- return result;
- }
-
- ///
- /// Return GCD of A and B.
- ///
- /// A
- /// B
- /// GCD of A and B
- public static int GCD(int a, int b)
- {
- return b == 0 ? a : GCD(b, a % b);
- }
-
- ///
- /// Return if this is a prime (1 counts)
- ///
- /// Number to inspect
- /// True if is prime, false elsewise
- public static bool IsPrime(int number)
- {
- if (number < 1) return false;
- if (number == 2) return true;
- if (number % 2 == 0) return false;
-
- var boundary = (int)Math.Floor(Math.Sqrt(number));
-
- for (int i = 3; i <= boundary; i += 2)
- if (number % i == 0)
- return false;
-
- return true;
- }
-
- ///
- /// Take in and replace the current information.
- ///
- /// Dictionary containing information needed
- public void TakeInformation(Dictionary information)
- {
- foreach (KeyValuePair x in information)
- {
- this.information.Add(x.Key, x.Value);
- }
- }
-
- public double GetTimeStamp(int bar, int tick)
- {
- double result = 0.0;
- int overallTick = bar * 384 + tick;
- if (overallTick != 0)
- {
- int maximumBPMIndex = 0;
- for (int i = 0; i < this.BPMChanges.ChangeNotes.Count; i++)
- {
- if (this.BPMChanges.ChangeNotes[i].TickStamp <= overallTick)
- {
- maximumBPMIndex = i;
- }
- }
- if (maximumBPMIndex == 0)
- {
- result = 60 / this.BPMChanges.ChangeNotes[0].BPM * 4 / 384;
- }
- else
- {
- for (int i = 1; i <= maximumBPMIndex; i++)
- {
- double previousTickTimeUnit = 60 / this.BPMChanges.ChangeNotes[i - 1].BPM * 4 / 384;
- result += (this.BPMChanges.ChangeNotes[i].TickStamp - this.BPMChanges.ChangeNotes[i - 1].TickStamp) * previousTickTimeUnit;
- }
- double tickTimeUnit = 60 / this.BPMChanges.ChangeNotes[maximumBPMIndex].BPM * 4 / 384;
- result += (overallTick - this.BPMChanges.ChangeNotes[maximumBPMIndex].TickStamp) * tickTimeUnit;
- }
- }
- return result;
- }
-
- ///
- /// Give time stamp given overall tick
- ///
- /// Note.Bar*384+Note.Tick
- /// Appropriate time stamp in seconds
- public double GetTimeStamp(int overallTick)
- {
- double result = 0.0;
- if (overallTick != 0)
- {
- bool foundMax = false;
- int maximumBPMIndex = 0;
- for (int i = 0; i < this.BPMChanges.ChangeNotes.Count && !foundMax; i++)
- {
- if (this.BPMChanges.ChangeNotes[i].TickStamp <= overallTick)
- {
- maximumBPMIndex = i;
- }
- else
- {
- foundMax = true;
- }
- }
- if (maximumBPMIndex == 0)
- {
- result = GetBPMTimeUnit(this.BPMChanges.ChangeNotes[0].BPM) * overallTick;
- }
- else
- {
- for (int i = 1; i <= maximumBPMIndex; i++)
- {
- double previousTickTimeUnit = GetBPMTimeUnit(this.BPMChanges.ChangeNotes[i - 1].BPM);
- result += (this.BPMChanges.ChangeNotes[i].TickStamp - this.BPMChanges.ChangeNotes[i - 1].TickStamp) * previousTickTimeUnit;
- }
- double tickTimeUnit = GetBPMTimeUnit(this.BPMChanges.ChangeNotes[maximumBPMIndex].BPM);
- result += (overallTick - this.BPMChanges.ChangeNotes[maximumBPMIndex].TickStamp) * tickTimeUnit;
- }
- }
- return result;
- }
-
- ///
- /// Give time stamp given overall tick
- ///
- /// Note.Bar*384+Note.Tick
- /// Appropriate time stamp in seconds
- public static double GetTimeStamp(BPMChanges bpmChanges, int overallTick)
- {
- double result = 0.0;
- if (overallTick != 0)
- {
- int maximumBPMIndex = 0;
- for (int i = 0; i < bpmChanges.ChangeNotes.Count; i++)
- {
- if (bpmChanges.ChangeNotes[i].TickStamp <= overallTick)
- {
- maximumBPMIndex = i;
- }
- }
- if (maximumBPMIndex == 0)
- {
- result = GetBPMTimeUnit(bpmChanges.ChangeNotes[0].BPM) * overallTick;
- }
- else
- {
- for (int i = 1; i <= maximumBPMIndex; i++)
- {
- double previousTickTimeUnit = GetBPMTimeUnit(bpmChanges.ChangeNotes[i - 1].BPM);
- result += (bpmChanges.ChangeNotes[i].TickStamp - bpmChanges.ChangeNotes[i - 1].TickStamp) * previousTickTimeUnit;
- }
- double tickTimeUnit = GetBPMTimeUnit(bpmChanges.ChangeNotes[maximumBPMIndex].BPM);
- result += (overallTick - bpmChanges.ChangeNotes[maximumBPMIndex].TickStamp) * tickTimeUnit;
- }
- }
- return result;
- }
-
- ///
- /// Return BPM tick unit of given bpm
- ///
- /// BPM to calculate
- /// Tick Unit of BPM
- public static double GetBPMTimeUnit(double bpm)
- {
- double result = 60 / bpm * 4 / 384;
- return result;
- }
-
- ///
- /// For debug use: print out the note's time stamp in given bpm changes
- ///
- /// The list of BPMChanges
- /// The Note to test
- /// String of result, consists tick time stamp, wait time stamp and last time stamp
- public static string GetNoteDetail(BPMChanges bpmChanges, Note inTake)
- {
- string result = "";
- result += inTake.Compose(1) + "\n";
- result += "This is a " + inTake.NoteSpecificType + " note,\n";
- result += "This note has overall tick of " + inTake.TickStamp + ", and therefor, the tick time stamp shall be " + GetTimeStamp(bpmChanges, inTake.TickStamp) + "\n";
- if (inTake.NoteGenre.Equals("SLIDE"))
- {
- result += "This note has wait length of " + inTake.WaitLength + ", and therefor, its wait tick stamp is " + inTake.WaitTickStamp + " with wait time stamp of " + GetTimeStamp(bpmChanges, inTake.WaitTickStamp) + "\n";
- result += "This note has last length of " + inTake.LastLength + ", and therefor, its last tick stamp is " + inTake.LastTickStamp + " with last time stamp of " + GetTimeStamp(bpmChanges, inTake.LastTickStamp) + "\n";
- }
- return result;
- }
-
- ///
- /// Return the BPM at certain tick
- ///
- /// Tick to specify
- /// BPM at that tick
- public double GetBPMByTick(int overallTick)
- {
- double result = this.bpmChanges.ChangeNotes[0].BPM;
- if (overallTick > 0)
- {
- int maximumBPMIndex = 0;
- for (int i = 0; i < this.bpmChanges.ChangeNotes.Count; i++)
- {
- if (this.bpmChanges.ChangeNotes[i].TickStamp <= overallTick)
- {
- maximumBPMIndex = i;
- }
- }
- result = this.bpmChanges.ChangeNotes[maximumBPMIndex].BPM;
-
- }
- return result;
- }
-
- ///
- /// Determine if there are BPM change in between ticks
- ///
- /// Tick to start with
- /// Tick to end with
- ///
- public bool HasBPMChangeInBetween(int startTick, int endTick)
- {
- bool result = false;
-
- for (int i = 0; i < this.bpmChanges.ChangeNotes.Count && !result; i++)
- {
- if (this.bpmChanges.ChangeNotes[i].TickStamp > startTick && this.bpmChanges.ChangeNotes[i].TickStamp < endTick)
- {
- result = true;
- }
- }
-
- return result;
- }
- }
-}
\ No newline at end of file
diff --git a/ChartPack.cs b/ChartPack.cs
deleted file mode 100644
index 0bfd10a..0000000
--- a/ChartPack.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-using System;
-
-namespace MaichartConverter;
-
-///
-/// Construct a collection to store charts in relate of SD and DX.
-///
-public abstract class ChartPack : Chart, IChart
-{
- ///
- /// Stores SD and DX chart
- /// [0] SD [1] DX
- ///
- private List[] sddxCharts;
-
- ///
- /// Stores shared information
- ///
- private TrackInformation? globalInformation;
-
- ///
- /// Default constructor
- ///
- public ChartPack()
- {
- sddxCharts = new List[2];
- }
-
- ///
- /// Accesses this.sddxCharts
- ///
- /// this.sddxCharts
- public List[] SDDXCharts
- {
- get
- {
- return this.sddxCharts;
- }
- set
- {
- this.sddxCharts=value;
- }
- }
-
- ///
- /// Accesses this.globalInformation
- ///
- /// this.globalInformation
- public TrackInformation? GlobalInformation
- {
- get
- {
- return this.globalInformation;
- }
- set
- {
- this.globalInformation=value;
- }
- }
-
- // public abstract bool CheckValidity();
-
- public override string Compose()
- {
- throw new NotImplementedException();
- }
-
- // public abstract void Update();
-}
\ No newline at end of file
diff --git a/CodeMap.dgml b/CodeMap.dgml
deleted file mode 100644
index 619756f..0000000
--- a/CodeMap.dgml
+++ /dev/null
@@ -1,1828 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Hold.cs b/Hold.cs
deleted file mode 100644
index 6aa6ea2..0000000
--- a/Hold.cs
+++ /dev/null
@@ -1,192 +0,0 @@
-namespace MaichartConverter
-{
- ///
- /// Constructs Hold Note
- ///
- public class Hold : Note
- {
- ///
- /// Stores if this Touch Hold have special effect
- ///
- private int specialEffect;
-
- ///
- /// Stores the size of touch hold
- ///
- private string touchSize;
-
- ///
- /// Stores enums of accepting Hold type
- ///
- ///
- private readonly string[] allowedType = { "HLD", "XHO", "THO" };
-
- ///
- /// Construct a Hold Note
- ///
- /// HLD,XHO
- /// Key of the hold note
- /// Bar of the hold note
- /// Tick of the hold note
- /// Last time of the hold note
- public Hold(string noteType, int bar, int startTime, string key, int lastTime)
- {
- this.NoteType = noteType;
- this.Key = key;
- this.Bar = bar;
- this.Tick = startTime;
- this.LastLength = lastTime;
- this.specialEffect = 0;
- this.touchSize = "M1";
- this.Update();
- }
-
- ///
- /// Construct a Touch Hold Note
- ///
- /// THO
- /// Key of the hold note
- /// Bar of the hold note
- /// Tick of the hold note
- /// Last time of the hold note
- /// Store if the touch note ends with special effect
- /// Determines how large the touch note is
- public Hold(string noteType, int bar, int startTime, string key, int lastTime, int specialEffect, string touchSize)
- {
- this.NoteType = noteType;
- this.Key = key;
- this.Bar = bar;
- this.Tick = startTime;
- this.LastLength = lastTime;
- this.specialEffect = specialEffect;
- this.touchSize = touchSize;
- this.Update();
- }
-
- ///
- /// Construct a Hold from another note
- ///
- /// The intake note
- /// Will raise exception if touch size is null
- public Hold(Note inTake)
- {
- this.NoteType = inTake.NoteType;
- this.Key = inTake.Key;
- this.EndKey = inTake.EndKey;
- this.Bar = inTake.Bar;
- this.Tick = inTake.Tick;
- this.TickStamp = inTake.TickStamp;
- this.TickTimeStamp = inTake.TickTimeStamp;
- this.LastLength = inTake.LastLength;
- this.LastTickStamp = inTake.LastTickStamp;
- this.LastTimeStamp = inTake.LastTimeStamp;
- this.WaitLength = inTake.WaitLength;
- this.WaitTickStamp = inTake.WaitTickStamp;
- this.WaitTimeStamp = inTake.WaitTimeStamp;
- this.CalculatedLastTime = inTake.CalculatedLastTime;
- this.CalculatedLastTime = inTake.CalculatedLastTime;
- this.TickBPMDisagree = inTake.TickBPMDisagree;
- this.BPM = inTake.BPM;
- this.BPMChangeNotes = inTake.BPMChangeNotes;
- if (inTake.NoteGenre == "HOLD")
- {
- this.touchSize = ((Hold)inTake).TouchSize ?? throw new NullReferenceException();
- this.specialEffect = ((Hold)inTake).SpecialEffect;
- }
- else
- {
- this.touchSize = "M1";
- this.specialEffect = 0;
- }
- }
-
- ///
- /// Returns if the note comes with Special Effect
- ///
- /// 0 if no, 1 if yes
- public int SpecialEffect
- {
- get { return specialEffect; }
- }
-
- ///
- /// Returns the size of the note
- ///
- /// M1 if regular, L1 if large
- public string TouchSize
- {
- get { return touchSize; }
- }
-
- public override bool CheckValidity()
- {
- bool result = false;
- foreach (string x in allowedType)
- {
- result = result || this.NoteType.Equals(x);
- }
- result = result && NoteType.Length == 3;
- result = result && Key.Length <= 2;
- return result;
- }
-
- public override string Compose(int format)
- {
- string result = "";
- if (format == 1 && !(this.NoteType.Equals("THO")))
- {
- result = this.NoteType + "\t" + this.Bar + "\t" + this.Tick + "\t" + this.Key + "\t" + this.LastLength;
- }
- else if (format == 1 && this.NoteType.Equals("THO"))
- {
- result = this.NoteType + "\t" + this.Bar + "\t" + this.Tick + "\t" + this.Key.ToCharArray()[0] + "\t" + this.LastLength + "\t" + this.Key.ToCharArray()[1] + "\t"+this.SpecialEffect+"\tM1"; //M1 for regular note and L1 for Larger Note
- }
- else if (format == 0)
- {
- switch (this.NoteType)
- {
- case "HLD":
- result += (Convert.ToInt32(this.Key) + 1) + "h" + GenerateAppropriateLength(this.LastLength);
- break;
- case "XHO":
- result += (Convert.ToInt32(this.Key) + 1) + "xh" + GenerateAppropriateLength(this.LastLength);
- break;
- case "THO":
- if (this.SpecialEffect == 1)
- {
- result += this.Key.ToCharArray()[1].ToString() + ((Convert.ToInt32(this.Key.Substring(0, 1)) + 1).ToString() + "hf" + GenerateAppropriateLength(this.LastLength));
- }
- else
- result += this.Key.ToCharArray()[1].ToString() + ((Convert.ToInt32(this.Key.Substring(0, 1)) + 1).ToString() + "xh" + GenerateAppropriateLength(this.LastLength));
- break;
- }
- }
- return result;
- }
-
- public override string NoteGenre => "HOLD";
-
- public override bool IsNote => true;
-
- public override string NoteSpecificType
- {
- get
- {
- string result = "HOLD";
- //switch (this.NoteType)
- //{
- // case "HLD":
- // result += "HOLD";
- // break;
- // case "XHO":
- // result += "HOLD";
- // break;
- // case "THO":
- // result += "HOLD_TOUCH";
- // break;
- //}
- return result;
- }
- }
- }
-}
diff --git a/IChart.cs b/IChart.cs
deleted file mode 100644
index 03ef4fe..0000000
--- a/IChart.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-namespace MaichartConverter
-{
- ///
- /// Provide interface for charts
- ///
- interface IChart
- {
- ///
- /// Updates all information
- ///
- void Update();
-
- ///
- /// Check if this chart is valid
- ///
- ///
- bool CheckValidity();
-
- ///
- /// Export this Good Brother
- ///
- ///
- string Compose();
-
- ///
- /// Get appropriate time stamp of given tick
- ///
- /// Time stamp of bar and note
- /// this.bpmChanges!=null
- double GetTimeStamp(int bar, int tick);
- }
-}
diff --git a/ICompiler.cs b/ICompiler.cs
deleted file mode 100644
index 46d470e..0000000
--- a/ICompiler.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-namespace MaichartConverter
-{
- ///
- /// Provide interface for Compilers
- ///
- public interface ICompiler
- {
- ///
- /// Intake information to compile data.
- ///
- /// TakeInformation to provide
- public void TakeInformation(Dictionary information);
-
- ///
- /// Compose given chart to specific format.
- ///
- /// Corresponding chart
- public string Compose();
-
- ///
- /// Check if the chart given is valid to print.
- ///
- /// True if valid, false elsewise
- public bool CheckValidity();
- }
-}
-
diff --git a/INote.cs b/INote.cs
deleted file mode 100644
index 7b431af..0000000
--- a/INote.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-namespace MaichartConverter
-{
- ///
- /// Provide interface and basic functions for Notes
- ///
- interface INote
- {
- ///
- /// Convert note to string for writing
- ///
- /// 0 if Simai, 1 if Ma2
- string Compose(int format);
-
- ///
- /// See if current note has all information needed
- ///
- /// True if qualified, false elsewise
- bool CheckValidity();
-
- ///
- /// Updates this note instance.
- ///
- /// True if Calculated Times is defined, false elsewise
- bool Update();
-
- ///
- /// Give time stamp given overall tick
- ///
- /// Note.Bar*384+Note.Tick
- /// Appropriate time stamp in seconds
- double GetTimeStamp(int overallTick);
- }
-}
diff --git a/IParser.cs b/IParser.cs
deleted file mode 100644
index c4a89b2..0000000
--- a/IParser.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-using System.Reflection.Emit;
-
-namespace MaichartConverter
-{
- ///
- /// Provide interface for parsers
- ///
- public interface IParser
- {
- ///
- /// Return correct GoodBrother of given Token.
- ///
- /// Token to intake
- /// Corresponding GoodBrother
- public Chart ChartOfToken(string[] token);
-
- ///
- /// Return correct BPMChanges of given Token.
- ///
- /// Token to intake
- /// Corresponding BPMChanges
- public BPMChanges BPMChangesOfToken(string token);
-
- ///
- /// Return corresponding MeasureChanges
- ///
- /// Intake token
- /// Corresponding measure change
- public MeasureChanges MeasureChangesOfToken(string token);
-
- ///
- /// Return a specific note of given Token.
- ///
- /// Token to take in
- /// Specific Note
- public Note NoteOfToken(string token);
-
- ///
- /// Return a specific note of given Token.
- ///
- /// Token to take in
- ///
- ///
- ///
- /// Specific Note
- public Note NoteOfToken(string token,int bar, int tick, double bpm);
-
- ///
- /// Return correct Tap note.
- ///
- /// Token to take in
- /// Bar of this note
- /// Tick of this note
- /// BPM of this note
- /// Specific Tap
- public Tap TapOfToken(string token,int bar, int tick, double bpm);
-
- ///
- /// Return correct Tap note.
- ///
- /// Token to take in
- /// Specific Tap
- public Tap TapOfToken(string token);
-
-
- ///
- /// Return correct Hold note.
- ///
- /// Token to take in
- /// Bar of this note
- /// Tick of this note
- /// BPM of this note
- /// Specific Hold Note
- public Hold HoldOfToken(string token, int bar, int tick,double bpm);
-
- ///
- /// Return correct Hold note.
- ///
- /// Token to take in
- /// Specific Hold Note
- public Hold HoldOfToken(string token);
-
-
- ///
- /// Return correct Slide note.
- ///
- /// Token to take in
- /// Bar of this note
- /// Tick of this note
- /// The start note of this slide
- /// BPM of this note
- /// Specific Slide Note
- public Slide SlideOfToken(string token,int bar, int tick, Note slideStart, double bpm);
-
- ///
- /// Return correct Slide note.
- ///
- /// Token to take in
- /// Specific Slide Note
- public Slide SlideOfToken(string token);
-
- }
-}
-
diff --git a/ITokenizer.cs b/ITokenizer.cs
deleted file mode 100644
index 840b1f9..0000000
--- a/ITokenizer.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-namespace MaichartConverter
-{
- ///
- /// Intake files and tokenize.
- ///
- partial interface ITokenizer
- {
- ///
- /// Intake files and return tokens.
- ///
- ///
- /// Tokens from file specified
- string[] Tokens(string location);
-
- ///
- /// Intake files and return tokens.
- ///
- ///
- /// Tokens from text specified
- string[] TokensFromText(string text);
- }
-}
-
diff --git a/IXmlUtility.cs b/IXmlUtility.cs
deleted file mode 100644
index 3425e91..0000000
--- a/IXmlUtility.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System.Xml;
-
-namespace MaichartConverter
-{
- ///
- /// Provide handful methods for Xml
- ///
- internal interface IXmlUtility
- {
- /////
- ///// Load and construct Xml document from given location.
- /////
- ///// Location to find
- //public void Load(string location);
-
- ///
- /// Save Xml to specified location.
- ///
- /// Location to save
- public void Save(string location);
-
- ///
- /// Return nodes with specified name
- ///
- ///
- /// XmlNodeList having name specified
- public XmlNodeList GetMatchNodes(string name);
-
- ///
- /// Update the information using given takeinValue.
- ///
- public void Update();
- }
-}
diff --git a/Ma2.cs b/Ma2.cs
deleted file mode 100644
index 600d1de..0000000
--- a/Ma2.cs
+++ /dev/null
@@ -1,155 +0,0 @@
-using System.Linq.Expressions;
-
-namespace MaichartConverter
-{
- ///
- /// Implementation of chart in ma2 format.
- ///
- public class Ma2 : Chart, ICompiler
- {
- ///
- /// Default Constructor.
- ///
- public Ma2()
- {
- this.Notes = new List();
- this.BPMChanges = new BPMChanges();
- this.MeasureChanges = new MeasureChanges();
- this.StoredChart = new List>();
- this.Information = new Dictionary();
- }
-
- ///
- /// Construct Ma2 with given notes, bpm change definitions and measure change definitions.
- ///
- /// Notes in Ma2
- /// BPM Changes: Initial BPM is NEEDED!
- /// Measure Changes: Initial Measure is NEEDED!
- public Ma2(List notes, BPMChanges bpmChanges, MeasureChanges measureChanges)
- {
- this.Notes = new List(notes);
- this.BPMChanges = new BPMChanges(bpmChanges);
- this.MeasureChanges = new MeasureChanges(measureChanges);
- this.StoredChart = new List>();
- this.Information = new Dictionary();
- this.Update();
- }
-
- ///
- /// Construct GoodBrother from location specified
- ///
- /// MA2 location
- public Ma2(string location)
- {
- string[] tokens = new Ma2Tokenizer().Tokens(location);
- Chart takenIn = new Ma2Parser().ChartOfToken(tokens);
- this.Notes = new List(takenIn.Notes);
- this.BPMChanges = new BPMChanges(takenIn.BPMChanges);
- this.MeasureChanges = new MeasureChanges(takenIn.MeasureChanges);
- this.StoredChart = new List>(takenIn.StoredChart);
- this.Information = new Dictionary(takenIn.Information);
- this.Update();
- }
-
- ///
- /// Construct Ma2 with tokens given
- ///
- /// Tokens given
- public Ma2(string[] tokens)
- {
- Chart takenIn = new Ma2Parser().ChartOfToken(tokens);
- this.Notes = takenIn.Notes;
- this.BPMChanges = takenIn.BPMChanges;
- this.MeasureChanges = takenIn.MeasureChanges;
- this.StoredChart = new List>(takenIn.StoredChart);
- this.Information = new Dictionary(takenIn.Information);
- this.Update();
- }
-
- ///
- /// Construct Ma2 with existing values
- ///
- /// Existing good brother
- public Ma2(Chart takenIn)
- {
- this.Notes = new List(takenIn.Notes);
- this.BPMChanges = new BPMChanges(takenIn.BPMChanges);
- this.MeasureChanges = new MeasureChanges(takenIn.MeasureChanges);
- this.StoredChart = new List>(takenIn.StoredChart);
- this.Information = new Dictionary(takenIn.Information);
- this.Update();
- }
-
- public override bool CheckValidity()
- {
- bool result = this == null;
- // Not yet implemented
- return result;
- }
-
- public override string Compose()
- {
- string result = "";
- const string header1 = "VERSION\t0.00.00\t1.03.00\nFES_MODE\t0\n";
- const string header2 = "RESOLUTION\t384\nCLK_DEF\t384\nCOMPATIBLE_CODE\tMA2\n";
- result += header1;
- result += BPMChanges.InitialChange;
- result += MeasureChanges.InitialChange;
- result += header2;
- result += "\n";
-
- result += BPMChanges.Compose();
- result += MeasureChanges.Compose();
- result += "\n";
-
- //foreach (Note x in this.Notes)
- //{
- // if (!x.Compose(1).Equals(""))
- // {
- // result += x.Compose(1) + "\n";
- // }
- //}
- foreach (List bar in this.StoredChart)
- {
- foreach (Note x in bar)
- {
- if (!x.Compose(1).Equals(""))
- {
- result += x.Compose(1) + "\n";
- }
- }
- }
- result += "\n";
- return result;
- }
-
- ///
- /// Override and compose with given arrays
- ///
- /// Override BPM array
- /// Override Measure array
- /// Good Brother with override array
- public override string Compose(BPMChanges bpm, MeasureChanges measure)
- {
- string result = "";
- const string header1 = "VERSION\t0.00.00\t1.03.00\nFES_MODE\t0\n";
- const string header2 = "RESOLUTION\t384\nCLK_DEF\t384\nCOMPATIBLE_CODE\tMA2\n";
- result += header1;
- result += bpm.InitialChange;
- result += measure.InitialChange;
- result += header2;
- result += "\n";
-
- result += bpm.Compose();
- result += measure.Compose();
- result += "\n";
-
- foreach (Note y in this.Notes)
- {
- result += y.Compose(1) + "\n";
- }
- result += "\n";
- return result;
- }
- }
-}
diff --git a/Ma2Tokenizer.cs b/Ma2Tokenizer.cs
deleted file mode 100644
index 163302a..0000000
--- a/Ma2Tokenizer.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-namespace MaichartConverter
-{
- ///
- /// Tokenizer of ma2 file
- ///
- public class Ma2Tokenizer : ITokenizer
- {
- ///
- /// Empty Constructor
- ///
- public Ma2Tokenizer()
- {
- }
-
- public string[] Tokens(string location)
- {
- string[] result = System.IO.File.ReadAllLines(location);
- return result;
- }
-
- public string[] TokensFromText(string text)
- {
- string[] result = text.Split("\n");
- return result;
- }
- }
-}
-
diff --git a/Ma2parser.cs b/Ma2parser.cs
deleted file mode 100644
index f4900dc..0000000
--- a/Ma2parser.cs
+++ /dev/null
@@ -1,410 +0,0 @@
-using System.Runtime.CompilerServices;
-
-namespace MaichartConverter
-{
- public enum StdParam { Type, Bar, Tick, KeyOrParam, WaitTimeOrParam, LastTime, EndKey };
- public enum DxParam { Type, Bar, Tick, Key, KeyGroupOrLastTime, SpecialEffect, NoteSize };
- ///
- /// Parses ma2 file into Ma2 chart format
- ///
- public class Ma2Parser : IParser
- {
- private Tap PreviousSlideStart;
- ///
- /// Empty constructor
- ///
- public Ma2Parser()
- {
- PreviousSlideStart = new Tap();
- }
-
- public Chart ChartOfToken(string[] token)
- {
- BPMChanges bpmChanges = new BPMChanges();
- MeasureChanges measureChanges = new MeasureChanges();
- List notes = new List();
- if (token != null)
- {
- foreach (string x in token)
- {
- bool isBPM_DEF = x.Split('\t')[(int)StdParam.Type].Equals("BPM_DEF");
- bool isMET_DEF = x.Split('\t')[(int)StdParam.Type].Equals("MET_DEF");
- bool isBPM = x.Split('\t')[(int)StdParam.Type].Equals("BPM");
- bool isMET = x.Split('\t')[(int)StdParam.Type].Equals("MET");
- bool isNOTE = x.Split('\t')[(int)StdParam.Type].Equals("TAP")
- || x.Split('\t')[(int)StdParam.Type].Equals("STR")
- || x.Split('\t')[(int)StdParam.Type].Equals("TTP")
- || x.Split('\t')[(int)StdParam.Type].Equals("XTP")
- || x.Split('\t')[(int)StdParam.Type].Equals("XST")
- || x.Split('\t')[(int)StdParam.Type].Equals("BRK")
- || x.Split('\t')[(int)StdParam.Type].Equals("BST")
- || x.Split('\t')[(int)StdParam.Type].Equals("HLD")
- || x.Split('\t')[(int)StdParam.Type].Equals("XHO")
- || x.Split('\t')[(int)StdParam.Type].Equals("THO")
- || x.Split('\t')[(int)StdParam.Type].Equals("SI_")
- || x.Split('\t')[(int)StdParam.Type].Equals("SV_")
- || x.Split('\t')[(int)StdParam.Type].Equals("SF_")
- || x.Split('\t')[(int)StdParam.Type].Equals("SCL")
- || x.Split('\t')[(int)StdParam.Type].Equals("SCR")
- || x.Split('\t')[(int)StdParam.Type].Equals("SUL")
- || x.Split('\t')[(int)StdParam.Type].Equals("SUR")
- || x.Split('\t')[(int)StdParam.Type].Equals("SLL")
- || x.Split('\t')[(int)StdParam.Type].Equals("SLR")
- || x.Split('\t')[(int)StdParam.Type].Equals("SXL")
- || x.Split('\t')[(int)StdParam.Type].Equals("SXR")
- || x.Split('\t')[(int)StdParam.Type].Equals("SSL")
- || x.Split('\t')[(int)StdParam.Type].Equals("SSR");
-
- if (isBPM_DEF)
- {
- bpmChanges = BPMChangesOfToken(x);
- }
- else if (isMET_DEF)
- {
- measureChanges = MeasureChangesOfToken(x);
- }
- else if (isBPM)
- {
- string[] bpmCandidate = x.Split('\t');
- BPMChange candidate = new BPMChange(Int32.Parse(bpmCandidate[1]),
- Int32.Parse(bpmCandidate[2]),
- Double.Parse(bpmCandidate[3]));
- // foreach (BPMChange change in bpmChanges.ChangeNotes)
- // {
- // if (change.TickStamp <= candidate.LastTickStamp)
- // {
- // candidate.BPMChangeNotes.Add(change);
- // Console.WriteLine("A BPM change note was added with overall tick of "+change.TickStamp + " with bpm of "+change.BPM);
- // }
- // }
- bpmChanges.Add(candidate);
- bpmChanges.Update();
- }
- else if (isMET)
- {
- string[] measureCandidate = x.Split('\t');
- measureChanges.Add(Int32.Parse(measureCandidate[(int)StdParam.Bar]),
- Int32.Parse(measureCandidate[(int)StdParam.Tick]),
- Int32.Parse(measureCandidate[(int)StdParam.KeyOrParam]),
- Int32.Parse(measureCandidate[(int)StdParam.WaitTimeOrParam]));
- }
- else if (isNOTE)
- {
- Note candidate = NoteOfToken(x);
- // foreach (BPMChange change in bpmChanges.ChangeNotes)
- // {
- // if (change.TickStamp <= candidate.LastTickStamp)
- // {
- // candidate.BPMChangeNotes.Add(change);
- // Console.WriteLine("A BPM change note was added with overall tick of " + change.TickStamp + " with bpm of " + change.BPM);
- // }
- // }
- notes.Add(candidate);
- }
- }
- }
- foreach (Note note in notes)
- {
- note.BPMChangeNotes = bpmChanges.ChangeNotes;
- if (bpmChanges.ChangeNotes.Count>0 && note.BPMChangeNotes.Count == 0)
- {
- throw new IndexOutOfRangeException("BPM COUNT DISAGREE");
- }
- if (bpmChanges.ChangeNotes.Count == 0)
- {
- throw new IndexOutOfRangeException("BPM CHANGE COUNT DISAGREE");
- }
- }
- Chart result = new Ma2(notes, bpmChanges, measureChanges);
- return result;
- }
-
- public BPMChanges BPMChangesOfToken(string token)
- {
- return new BPMChanges();
- }
-
- public MeasureChanges MeasureChangesOfToken(string token)
- {
- return new MeasureChanges(Int32.Parse(token.Split('\t')[1]), Int32.Parse(token.Split('\t')[2]));
- }
-
- public Note NoteOfToken(string token)
- {
- Note result = new Rest();
- bool isTap = token.Split('\t')[(int)StdParam.Type].Equals("TAP")
- || token.Split('\t')[(int)StdParam.Type].Equals("STR")
- || token.Split('\t')[(int)StdParam.Type].Equals("TTP")
- || token.Split('\t')[(int)StdParam.Type].Equals("XTP")
- || token.Split('\t')[(int)StdParam.Type].Equals("XST")
- || token.Split('\t')[(int)StdParam.Type].Equals("BRK")
- || token.Split('\t')[(int)StdParam.Type].Equals("BST");
- bool isHold = token.Split('\t')[(int)StdParam.Type].Equals("HLD")
- || token.Split('\t')[(int)StdParam.Type].Equals("XHO")
- || token.Split('\t')[(int)StdParam.Type].Equals("THO");
- bool isSlide = token.Split('\t')[(int)StdParam.Type].Equals("SI_")
- || token.Split('\t')[(int)StdParam.Type].Equals("SV_")
- || token.Split('\t')[(int)StdParam.Type].Equals("SF_")
- || token.Split('\t')[(int)StdParam.Type].Equals("SCL")
- || token.Split('\t')[(int)StdParam.Type].Equals("SCR")
- || token.Split('\t')[(int)StdParam.Type].Equals("SUL")
- || token.Split('\t')[(int)StdParam.Type].Equals("SUR")
- || token.Split('\t')[(int)StdParam.Type].Equals("SLL")
- || token.Split('\t')[(int)StdParam.Type].Equals("SLR")
- || token.Split('\t')[(int)StdParam.Type].Equals("SXL")
- || token.Split('\t')[(int)StdParam.Type].Equals("SXR")
- || token.Split('\t')[(int)StdParam.Type].Equals("SSL")
- || token.Split('\t')[(int)StdParam.Type].Equals("SSR");
- string[] candidate = token.Split('\t');
- int bar = Int32.Parse(candidate[(int)StdParam.Bar]);
- int tick = Int32.Parse(candidate[(int)StdParam.Tick]);
- foreach (string x in candidate)
- {
- if (isTap)
- {
- result = TapOfToken(token);
- if (result.NoteSpecificType.Equals("SLIDE_START"))
- {
- PreviousSlideStart = (Tap)result;
- }
- }
- else if (isHold)
- {
- result = HoldOfToken(token);
- }
- else if (isSlide)
- {
- result = SlideOfToken(token);
- result.SlideStart = PreviousSlideStart;
- }
- }
- if (result.Tick == 384)
- {
- result.Tick = 0;
- result.Bar++;
- }
- return result;
- }
-
- public Note NoteOfToken(string token, int bar, int tick, double bpm)
- {
- Note result = new Rest();
- bool isTap = token.Split('\t')[(int)StdParam.Type].Equals("TAP")
- || token.Split('\t')[(int)StdParam.Type].Equals("STR")
- || token.Split('\t')[(int)StdParam.Type].Equals("TTP")
- || token.Split('\t')[(int)StdParam.Type].Equals("XTP")
- || token.Split('\t')[(int)StdParam.Type].Equals("XST")
- || token.Split('\t')[(int)StdParam.Type].Equals("BRK")
- || token.Split('\t')[(int)StdParam.Type].Equals("BST");
- bool isHold = token.Split('\t')[(int)StdParam.Type].Equals("HLD")
- || token.Split('\t')[(int)StdParam.Type].Equals("XHO")
- || token.Split('\t')[(int)StdParam.Type].Equals("THO");
- bool isSlide = token.Split('\t')[(int)StdParam.Type].Equals("SI_")
- || token.Split('\t')[(int)StdParam.Type].Equals("SV_")
- || token.Split('\t')[(int)StdParam.Type].Equals("SF_")
- || token.Split('\t')[(int)StdParam.Type].Equals("SCL")
- || token.Split('\t')[(int)StdParam.Type].Equals("SCR")
- || token.Split('\t')[(int)StdParam.Type].Equals("SUL")
- || token.Split('\t')[(int)StdParam.Type].Equals("SUR")
- || token.Split('\t')[(int)StdParam.Type].Equals("SLL")
- || token.Split('\t')[(int)StdParam.Type].Equals("SLR")
- || token.Split('\t')[(int)StdParam.Type].Equals("SXL")
- || token.Split('\t')[(int)StdParam.Type].Equals("SXR")
- || token.Split('\t')[(int)StdParam.Type].Equals("SSL")
- || token.Split('\t')[(int)StdParam.Type].Equals("SSR");
- string[] candidate = token.Split('\t');
- foreach (string x in candidate)
- {
- if (isTap)
- {
- result = TapOfToken(token, bar, tick, bpm);
- }
- else if (isHold)
- {
- result = HoldOfToken(token, bar, tick, bpm);
- }
- else if (isSlide)
- {
- result = SlideOfToken(token, bar, tick,PreviousSlideStart, bpm);
- }
- }
- if (result.Tick == 384)
- {
- result.Tick = 0;
- result.Bar++;
- }
- return result;
- }
-
- public Hold HoldOfToken(string token, int bar, int tick, double bpm)
- {
- Note result = new Rest();
- string[] candidate = token.Split('\t');
- if (candidate[(int)StdParam.Type].Equals("THO") && candidate.Count() > 7)
- {
- result = new Hold(candidate[(int)StdParam.Type],
- bar,
- tick,
- candidate[(int)StdParam.KeyOrParam] + candidate[(int)StdParam.LastTime], int.Parse(candidate[(int)DxParam.SpecialEffect]),
- int.Parse(candidate[(int)StdParam.EndKey]),
- candidate[7]); //candidate[(int)StdParam.EndKey] is special effect
- }
- else if (candidate[(int)StdParam.Type].Equals("THO") && candidate.Count() <= 7)
- {
- //Console.ReadLine();
- result = new Hold(candidate[(int)StdParam.Type],
- int.Parse(candidate[(int)StdParam.Bar]),
- int.Parse(candidate[(int)StdParam.Tick]),
- candidate[(int)StdParam.KeyOrParam] + candidate[(int)StdParam.LastTime], int.Parse(candidate[(int)StdParam.WaitTimeOrParam]),
- int.Parse(candidate[(int)StdParam.EndKey]),
- "M1"); //candidate[(int)StdParam.EndKey] is special effect
- }
- else
- result = new Hold(candidate[(int)StdParam.Type],
- int.Parse(candidate[(int)StdParam.Bar]),
- int.Parse(candidate[(int)StdParam.Tick]),
- candidate[(int)StdParam.KeyOrParam],
- int.Parse(candidate[(int)StdParam.WaitTimeOrParam]));
- result.BPM = bpm;
- return (Hold)result;
- }
-
- public Hold HoldOfToken(string token)
- {
- string[] candidate = token.Split('\t');
- int bar = int.Parse(candidate[(int)StdParam.Bar]);
- int tick = int.Parse(candidate[(int)StdParam.Tick]);
- if (candidate[(int)StdParam.Type].Equals("THO") && candidate.Count() > 7)
- {
- return new Hold(candidate[(int)StdParam.Type],
- bar,
- tick,
- candidate[(int)StdParam.KeyOrParam] + candidate[(int)StdParam.LastTime], int.Parse(candidate[(int)StdParam.WaitTimeOrParam]),
- int.Parse(candidate[(int)StdParam.EndKey]),
- candidate[7]); //candidate[(int)StdParam.EndKey] is special effect
- }
- else if (candidate[(int)StdParam.Type].Equals("THO") && candidate.Count() <= 7)
- {
- //Console.ReadLine();
- return new Hold(candidate[(int)StdParam.Type],
- int.Parse(candidate[(int)StdParam.Bar]),
- int.Parse(candidate[(int)StdParam.Tick]),
- candidate[(int)StdParam.KeyOrParam] + candidate[(int)StdParam.LastTime], int.Parse(candidate[(int)StdParam.WaitTimeOrParam]),
- int.Parse(candidate[(int)StdParam.EndKey]),
- "M1"); //candidate[(int)StdParam.EndKey] is special effect
- }
- else
- return new Hold(candidate[(int)StdParam.Type],
- int.Parse(candidate[(int)StdParam.Bar]),
- int.Parse(candidate[(int)StdParam.Tick]),
- candidate[(int)StdParam.KeyOrParam],
- int.Parse(candidate[(int)StdParam.WaitTimeOrParam]));
- }
-
- public Slide SlideOfToken(string token, int bar, int tick, Note slideStart, double bpm)
- {
- Note result;
- string[] candidate = token.Split('\t');
- result = new Slide(candidate[(int)StdParam.Type],
- bar,
- tick,
- slideStart.Key,
- int.Parse(candidate[(int)StdParam.WaitTimeOrParam]),
- int.Parse(candidate[(int)StdParam.LastTime]),
- candidate[(int)StdParam.EndKey]);
- if (!slideStart.Key.Equals(candidate[(int)StdParam.KeyOrParam]))
- {
- throw new Exception("THE SLIDE START DOES NOT MATCH WITH THE DEFINITION OF THIS NOTE!");
- }
- result.BPM = bpm;
- return (Slide)result;
- }
-
- public Slide SlideOfToken(string token)
- {
- string[] candidate = token.Split('\t');
- int bar = int.Parse(candidate[(int)StdParam.Bar]);
- int tick = int.Parse(candidate[(int)StdParam.Tick]);
- if (!PreviousSlideStart.Key.Equals(candidate[(int)StdParam.KeyOrParam]))
- {
- Console.WriteLine("Expected key: " + candidate[(int)StdParam.KeyOrParam]);
- Console.WriteLine("Actual key: " + PreviousSlideStart.Key);
- Console.WriteLine("Previous Slide Start: " + PreviousSlideStart.Compose((int)StdParam.Bar));
- throw new Exception("THE SLIDE START DOES NOT MATCH WITH THE DEFINITION OF THIS NOTE!");
- }
- return new Slide(candidate[(int)StdParam.Type],
- bar,
- tick,
- PreviousSlideStart.Key,
- int.Parse(candidate[(int)StdParam.WaitTimeOrParam]),
- int.Parse(candidate[(int)StdParam.LastTime]),
- candidate[(int)StdParam.EndKey]);
- }
-
-
- public Tap TapOfToken(string token, int bar, int tick, double bpm)
- {
- Note result = new Rest();
- string[] candidate = token.Split('\t');
- if (candidate[(int)StdParam.Type].Equals("TTP") && (candidate.Count()) >= 7)
- {
- result = new Tap(candidate[(int)StdParam.Type],
- bar,
- tick,
- candidate[(int)StdParam.KeyOrParam] + candidate[(int)StdParam.WaitTimeOrParam],
- int.Parse(candidate[(int)StdParam.LastTime]),
- candidate[(int)StdParam.EndKey]);
- }
- else if (candidate[(int)StdParam.Type].Equals("TTP") && (candidate.Count()) < 7)
- {
- //Console.ReadLine();
- result = new Tap(candidate[(int)StdParam.Type],
- int.Parse(candidate[(int)StdParam.Bar]),
- int.Parse(candidate[(int)StdParam.Tick]),
- candidate[(int)StdParam.KeyOrParam] + candidate[(int)StdParam.WaitTimeOrParam],
- int.Parse(candidate[(int)StdParam.LastTime]),
- "M1");
- }
- else
- result = new Tap(candidate[(int)StdParam.Type],
- int.Parse(candidate[(int)StdParam.Bar]),
- int.Parse(candidate[(int)StdParam.Tick]),
- candidate[(int)StdParam.KeyOrParam]);
- result.BPM = bpm;
- return (Tap)result;
- }
-
- public Tap TapOfToken(string token)
- {
- string[] candidate = token.Split('\t');
- int bar = int.Parse(candidate[(int)StdParam.Bar]);
- int tick = int.Parse(candidate[(int)StdParam.Tick]);
- if (candidate[(int)StdParam.Type].Equals("TTP") && (candidate.Count()) >= 7)
- {
- return new Tap(candidate[(int)StdParam.Type],
- bar,
- tick,
- candidate[(int)StdParam.KeyOrParam] + candidate[(int)StdParam.WaitTimeOrParam],
- int.Parse(candidate[(int)StdParam.LastTime]),
- candidate[(int)StdParam.EndKey]);
- }
- else if (candidate[(int)StdParam.Type].Equals("TTP") && (candidate.Count()) < 7)
- {
- //Console.ReadLine();
- return new Tap(candidate[(int)StdParam.Type],
- int.Parse(candidate[(int)StdParam.Bar]),
- int.Parse(candidate[(int)StdParam.Tick]),
- candidate[(int)StdParam.KeyOrParam] + candidate[(int)StdParam.WaitTimeOrParam],
- int.Parse(candidate[(int)StdParam.LastTime]),
- "M1");
- }
- else
- return new Tap(candidate[(int)StdParam.Type],
- int.Parse(candidate[(int)StdParam.Bar]),
- int.Parse(candidate[(int)StdParam.Tick]),
- candidate[(int)StdParam.KeyOrParam]);
- }
- }
-
-}
-
diff --git a/MaichartConverter.csproj b/MaichartConverter.csproj
index 0a8f01c..5b4b2a2 100644
--- a/MaichartConverter.csproj
+++ b/MaichartConverter.csproj
@@ -6,6 +6,7 @@
enable
enable
1.0.3
+ AnyCPU;ARM64
diff --git a/MaichartConverter.sln b/MaichartConverter.sln
index 16e0ff2..cb2abb4 100644
--- a/MaichartConverter.sln
+++ b/MaichartConverter.sln
@@ -5,28 +5,22 @@ VisualStudioVersion = 17.1.31911.260
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MaichartConverter", "MaichartConverter.csproj", "{C80EAA2B-1033-415B-BB01-F8784133AB21}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MaichartConverterXTest", "..\MaichartConverterXTest\MaichartConverterXTest.csproj", "{4FD3245C-0104-4EBD-AE58-39BF3D303996}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MaichartConverterUnitTest", "..\MaichartConverterUnitTest\MaichartConverterUnitTest.csproj", "{59F9215B-ACF2-491B-9FB7-5CB568356A75}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|ARM64 = Debug|ARM64
Release|Any CPU = Release|Any CPU
+ Release|ARM64 = Release|ARM64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C80EAA2B-1033-415B-BB01-F8784133AB21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C80EAA2B-1033-415B-BB01-F8784133AB21}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C80EAA2B-1033-415B-BB01-F8784133AB21}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {C80EAA2B-1033-415B-BB01-F8784133AB21}.Debug|ARM64.Build.0 = Debug|ARM64
{C80EAA2B-1033-415B-BB01-F8784133AB21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C80EAA2B-1033-415B-BB01-F8784133AB21}.Release|Any CPU.Build.0 = Release|Any CPU
- {4FD3245C-0104-4EBD-AE58-39BF3D303996}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4FD3245C-0104-4EBD-AE58-39BF3D303996}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4FD3245C-0104-4EBD-AE58-39BF3D303996}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4FD3245C-0104-4EBD-AE58-39BF3D303996}.Release|Any CPU.Build.0 = Release|Any CPU
- {59F9215B-ACF2-491B-9FB7-5CB568356A75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {59F9215B-ACF2-491B-9FB7-5CB568356A75}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {59F9215B-ACF2-491B-9FB7-5CB568356A75}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {59F9215B-ACF2-491B-9FB7-5CB568356A75}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C80EAA2B-1033-415B-BB01-F8784133AB21}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {C80EAA2B-1033-415B-BB01-F8784133AB21}.Release|ARM64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/MeasureChange.cs b/MeasureChange.cs
deleted file mode 100644
index d0fec09..0000000
--- a/MeasureChange.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-namespace MaichartConverter
-{
- ///
- /// Defines measure change note that indicates a measure change in bar.
- ///
- public class MeasureChange : Note
- {
- private int quaver;
-
- ///
- /// Construct Empty
- ///
- public MeasureChange()
- {
- this.Tick = 0;
- this.quaver = 0;
- this.Update();
- }
-
- ///
- /// Construct BPMChange with given bar, tick, BPM
- ///
- /// Bar
- /// Tick
- /// Quaver
- public MeasureChange(int bar, int tick, int quaver)
- {
- this.Bar = bar;
- this.Tick = tick;
- this.quaver = quaver;
- this.Update();
- }
-
- ///
- /// Construct measureChange from another takeIn
- ///
- /// Another measure change note
- public MeasureChange(MeasureChange takeIn)
- {
- this.Bar = takeIn.Bar;
- this.Tick = takeIn.Tick;
- this.quaver = takeIn.Quaver;
- this.Update();
- }
-
- ///
- /// Return this.quaver
- ///
- /// Quaver
- public int Quaver
- {
- get { return this.quaver; }
- }
-
- public override bool CheckValidity()
- {
- return this.quaver>0;
- }
-
- public override string Compose(int format)
- {
- string result = "";
- if (format == 0)
- {
- result += "{" + this.Quaver + "}";
- //result += "{" + this.Quaver+"_"+this.Tick + "}";
- }
- return result;
- }
-
- public override string NoteGenre => "MEASURE";
-
- public override bool IsNote => false;
-
- public override string NoteSpecificType => "MEASURE";
- }
-}
diff --git a/MeasureChanges.cs b/MeasureChanges.cs
deleted file mode 100644
index bfb9832..0000000
--- a/MeasureChanges.cs
+++ /dev/null
@@ -1,169 +0,0 @@
-namespace MaichartConverter
-{
- ///
- /// Store measure change notes in a chart
- ///
- public class MeasureChanges
- {
- private List bar;
- private List tick;
- private List quavers;
- private List beats;
- private List changeNotes;
- private int initialQuaver;
- private int initialBeat;
-
- ///
- /// Construct an empty Measure Change
- ///
- public MeasureChanges()
- {
- bar = new List();
- tick = new List();
- quavers = new List();
- beats = new List();
- changeNotes = new List();
- }
-
- ///
- /// Construct Measure Change with existing one
- ///
- public MeasureChanges(MeasureChanges takeIn)
- {
- bar = new List(takeIn.Bar);
- tick = new List(takeIn.Tick);
- quavers = new List(takeIn.Quavers);
- beats = new List(takeIn.Beats);
- changeNotes = new List(takeIn.ChangeNotes);
- }
-
- ///
- /// Take in initial quavers and beats, incase MET_CHANGE is not specified
- ///
- /// Initial Quaver
- /// Initial Beat
- public MeasureChanges(int initialQuaver, int initialBeat)
- {
- bar = new List();
- tick = new List();
- quavers = new List();
- beats = new List();
- changeNotes = new List();
- this.initialQuaver = initialQuaver;
- this.initialBeat = initialBeat;
- }
-
- ///
- /// Construct a measure of given beats
- ///
- ///
- ///
- ///
- ///
- public MeasureChanges(List bar, List tick, List quavers, List beats)
- {
- this.bar = bar;
- this.tick = tick;
- this.quavers = quavers;
- this.initialQuaver = quavers[0];
- this.beats = beats;
- this.initialBeat = beats[0];
- changeNotes = new List();
- }
-
- ///
- /// Return this.Bar
- ///
- public List Bar
- {
- get { return bar; }
- }
-
- ///
- /// Return this.Tick
- ///
- public List Tick
- {
- get { return tick; }
- }
-
- ///
- /// Return this.Quavers
- ///
- public List Quavers
- {
- get { return quavers; }
- }
-
- ///
- /// Return this.Beats
- ///
- public List Beats
- {
- get { return beats; }
- }
-
- public List ChangeNotes
- {
- get { return changeNotes; }
- }
-
-
-
- ///
- /// Add new measure changes to MeasureChanges
- ///
- /// Bar which changes
- /// Tick which changes
- /// Quavers which changes
- /// Beat which changes
- public void Add(int bar, int tick, int quavers, int beats)
- {
- this.bar.Add(bar);
- this.tick.Add(tick);
- this.quavers.Add(quavers);
- this.beats.Add(beats);
- }
-
- ///
- /// Return first definitions
- ///
- public string InitialChange
- {
- get
- {
- return "MET_DEF" + "\t" + this.initialQuaver + "\t" + this.initialBeat + "\n";
- }
- }
-
- public bool CheckValidity()
- {
- bool result = bar.IndexOf(0) == 0;
- result = result && tick.IndexOf(0) == 0;
- result = result && !quavers[0].Equals(null);
- result = result && !beats[0].Equals(null);
- return result;
- }
-
- public string Compose()
- {
- string result = "";
- if (bar.Count == 0)
- {
- result += "MET" + "\t" + 0 + "\t" + 0 + "\t" + 4 + "\t" + 4 + "\n";
- }
- else
- {
- for (int i = 0; i < bar.Count; i++)
- {
- result += "MET" + "\t" + bar[i] + "\t" + tick[i] + "\t" + quavers[i] + "\t" + beats[i] + "\n";
- }
- }
- return result;
- }
-
- public void Update()
- {
- }
- }
-}
diff --git a/Note.cs b/Note.cs
deleted file mode 100644
index 4749fa1..0000000
--- a/Note.cs
+++ /dev/null
@@ -1,679 +0,0 @@
-using System.Numerics;
-using System.Resources;
-
-namespace MaichartConverter
-{
- ///
- /// Basic note
- ///
- public abstract class Note : IEquatable, INote, IComparable
- {
- ///
- /// The note type
- ///
- private string noteType;
-
- ///
- /// The key
- ///
- private string key;
-
- ///
- /// The end key
- ///
- private string endKey;
-
- ///
- /// The bar
- ///
- private int bar;
-
- ///
- /// The start time
- ///
- private int tick;
-
- ///
- /// The absolute tick calculated by this.bar*384+this.tick
- ///
- private int tickStamp;
-
- ///
- /// The start time stamp
- ///
- private double tickTimeStamp;
-
- ///
- /// The wait length
- ///
- private int waitLength;
-
- ///
- /// The stamp of wait time ends in ticks
- ///
- private int waitTickStamp;
-
- ///
- /// The stamp when the wait time ends in seconds
- ///
- private double waitTimeStamp;
-
- ///
- /// The calculated wait time in seconds
- ///
- private double calculatedWaitTime;
-
- ///
- /// The last length
- ///
- private int lastLength;
-
- ///
- /// The stamp when the last time ends in ticks
- ///
- private int lastTickStamp;
-
- ///
- /// The stamp when the last time ends in seconds
- ///
- private double lastTimeStamp;
-
- ///
- /// The calculated last time
- ///
- private double calculatedLastTime;
-
- ///
- /// Stores if the BPM of wait or last tick is in different BPM
- ///
- private bool tickBPMDisagree;
-
- ///
- /// The delayed
- ///
- private bool delayed;
-
- ///
- /// The BPM
- ///
- private double bpm;
-
- ///
- /// The previous
- ///
- private Note? prev;
-
- ///
- /// The next
- ///
- private Note? next;
-
- ///
- /// Stores the start note of slide
- ///
- private Note? slideStart;
-
- ///
- /// Stores the connecting slide of slide start
- ///
- private Note? consecutiveSlide;
-
- ///
- /// Stores all BPM change prior to this
- ///
- private List bpmChangeNotes;
-
- ///
- /// Construct an empty note
- ///
- public Note()
- {
- noteType = "";
- key = "";
- endKey = "";
- bar = 0;
- tick = 0;
- tickStamp = 0;
- tickTimeStamp = 0.0;
- lastLength = 0;
- lastTickStamp = 0;
- lastTimeStamp = 0.0;
- waitLength = 0;
- waitTickStamp = 0;
- waitTimeStamp = 0.0;
- calculatedLastTime = 0.0;
- calculatedWaitTime = 0.0;
- tickBPMDisagree = false;
- bpm = 0;
- bpmChangeNotes = new List();
- }
-
- ///
- /// Construct a note from other note
- ///
- /// The intake note
- public Note(Note inTake)
- {
- this.noteType = inTake.NoteType;
- this.key = inTake.Key;
- this.endKey = inTake.EndKey;
- this.bar = inTake.Bar;
- this.tick = inTake.Tick;
- this.tickStamp = inTake.TickStamp;
- this.tickTimeStamp = inTake.TickTimeStamp;
- this.lastLength = inTake.LastLength;
- this.lastTickStamp = inTake.LastTickStamp;
- this.lastTimeStamp = inTake.LastTimeStamp;
- this.waitLength = inTake.WaitLength;
- this.waitTickStamp = inTake.WaitTickStamp;
- this.waitTimeStamp = inTake.WaitTimeStamp;
- this.calculatedLastTime = inTake.CalculatedLastTime;
- this.calculatedLastTime = inTake.CalculatedLastTime;
- this.tickBPMDisagree = inTake.TickBPMDisagree;
- this.bpm = inTake.BPM;
- this.bpmChangeNotes = inTake.bpmChangeNotes;
- }
-
- ///
- /// Access NoteType
- ///
- public string NoteType
- {
- get
- {
- return this.noteType;
- }
- set
- {
- this.noteType = value;
- }
- }
-
- ///
- /// Access Key
- ///
- public string Key
- {
- get
- {
- return this.key;
- }
- set
- {
- this.key = value;
- }
- }
-
- ///
- /// Access Bar
- ///
- public int Bar
- {
- get
- {
- return this.bar;
- }
- set
- {
- this.bar = value;
- }
- }
-
- ///
- /// Access Tick
- ///
- public int Tick
- {
- get
- {
- return this.tick;
- }
- set
- {
- this.tick = value;
- }
- }
-
- ///
- /// Access Tick Stamp = this.Bar*384 + this.Tick
- ///
- public int TickStamp
- {
- get { return this.tickStamp; }
- set { this.tickStamp = value; }
- }
-
- ///
- /// Access Tick Stamp = this.Bar*384 + this.Tick
- ///
- public double TickTimeStamp
- {
- get { return this.tickTimeStamp; }
- set { this.tickTimeStamp = value; }
- }
-
- ///
- /// Access wait time
- ///
- public int WaitLength
- {
- get
- {
- return this.waitLength;
- }
- set
- {
- this.waitLength = value;
- }
- }
-
- ///
- /// Access the time stamp where wait time ends in ticks
- ///
- /// The incoming time
- public int WaitTickStamp
- {
- get { return this.waitTickStamp; }
- set { this.waitTickStamp = value; }
- }
-
- ///
- /// Access the time stamp where wait time ends in seconds
- ///
- /// The incoming time
- public double WaitTimeStamp
- {
- get { return this.waitTimeStamp; }
- set { this.waitTimeStamp = value; }
- }
-
- ///
- /// Gets or sets the calculated wait time.
- ///
- ///
- /// The calculated wait time in seconds.
- ///
- public double CalculatedWaitTime
- {
- get { return this.calculatedWaitTime; }
- set { this.calculatedWaitTime = value; }
- }
-
- ///
- /// Access EndTime
- ///
- public int LastLength
- {
- get
- {
- return this.lastLength;
- }
- set
- {
- this.lastLength = value;
- }
- }
-
- ///
- /// Access Last time in ticks
- ///
- public int LastTickStamp
- {
- get
- {
- return this.lastTickStamp;
- }
- set
- {
- this.lastTickStamp = value;
- }
- }
-
- ///
- /// Access last time in seconds
- ///
- public double LastTimeStamp
- {
- get
- {
- return this.lastTimeStamp;
- }
- set
- {
- this.lastTimeStamp = value;
- }
- }
-
- ///
- /// Gets or sets the calculated last time in seconds.
- ///
- ///
- /// The calculated last time in seconds.
- ///
- public double CalculatedLastTime
- {
- get => this.calculatedLastTime;
- set { this.calculatedLastTime = value; }
- }
-
- ///
- /// Stores if the wait or last are in different BPM
- ///
- /// True if in different BPM, false elsewise
- public bool TickBPMDisagree
- {
- get => this.tickBPMDisagree;
- set { this.tickBPMDisagree = value; }
- }
-
- ///
- /// Access EndKey
- ///
- public string EndKey
- {
- get
- {
- return this.endKey;
- }
- set
- {
- this.endKey = value;
- }
- }
-
- ///
- /// Access Delayed
- ///
- public bool Delayed
- {
- get { return this.delayed; }
- set { this.delayed = value; }
- }
-
- ///
- /// Access BPM
- ///
- public double BPM
- {
- get { return this.bpm; }
- set { this.bpm = value; }
- }
-
- ///
- /// Access this.prev;
- ///
- public Note? Prev
- {
- get { return this.prev; }
- set { this.prev = value; }
- }
-
- ///
- /// Access this.next
- ///
- public Note? Next
- {
- get { return this.next; }
- set { this.next = value; }
- }
-
- ///
- /// Return the slide start of a note (reserved for slides only)
- ///
- public Note? SlideStart
- {
- get { return this.slideStart; }
- set { this.slideStart = value; }
- }
-
- ///
- /// Return the consecutive of a note (reserved for slides only)
- ///
- public Note? ConsecutiveSlide
- {
- get { return this.consecutiveSlide; }
- set { this.consecutiveSlide = value; }
- }
-
- public List BPMChangeNotes
- {
- get
- {
- return this.bpmChangeNotes;
- }
- set
- {
- this.bpmChangeNotes = value;
- }
- }
-
- ///
- /// Return this.SpecificType
- ///
- /// string of specific genre (specific type of Tap, Slide, etc.)
- public abstract string NoteSpecificType { get; }
-
- ///
- /// Return this.noteGenre
- ///
- /// string of note genre (general category of TAP, SLIDE and HOLD)
- public abstract string NoteGenre { get; }
-
- ///
- /// Return if this is a true note
- ///
- /// True if is TAP,HOLD or SLIDE, false elsewise
- public abstract bool IsNote { get; }
-
- public abstract bool CheckValidity();
-
- public abstract string Compose(int format);
-
- public int CompareTo(Object? obj)
- {
- int result = 0;
-
- Note another = obj as Note ?? throw new NullReferenceException("Note is not defined");
-
- //else if (this.NoteSpecificType().Equals("SLIDE")&&(this.NoteSpecificType().Equals("TAP")|| this.NoteSpecificType().Equals("HOLD")) && this.tick == another.Tick && this.bar == another.Bar)
- //{
- // result = -1;
- //}
- //else if (this.NoteSpecificType().Equals("SLIDE_START") && (another.NoteSpecificType().Equals("TAP") || another.NoteSpecificType().Equals("HOLD")) && this.tick == another.Tick && this.bar == another.Bar)
- //{
- // Console.WriteLine("STAR AND TAP");
- // result = 1;
- // Console.WriteLine(this.NoteSpecificType() + ".compareTo(" + another.NoteSpecificType() + ") is" + result);
- // //Console.ReadKey();
- //}
- //if (this.Bar==another.Bar&&this.Tick==another.Tick)
- //{
- // if (this.NoteGenre().Equals("BPM"))
- // {
- // result = -1;
- // }
- // else if (this.NoteGenre().Equals("MEASURE"))
- // {
- // result = 1;
- // }
- // else if ((this.NoteSpecificType().Equals("TAP")|| this.NoteSpecificType().Equals("HOLD"))&&another.NoteSpecificType().Equals("SLIDE_START"))
- // {
- // result= -1;
- // }
- //}
- //else
- //{
- // if (this.bar != another.Bar)
- // {
- // result = this.bar.CompareTo(another.Bar);
- // //Console.WriteLine("this.compareTo(another) is" + result);
- // //Console.ReadKey();
- // }
- // else result = this.tick.CompareTo(another.Tick);
- //}
- if (this.Bar != another.Bar)
- {
- result = this.Bar.CompareTo(another.Bar);
- }
- else if (this.Bar == another.Bar && (this.Tick != another.Tick))
- {
- result = this.Tick.CompareTo(another.Tick);
- }
- else
- {
- if (this.NoteSpecificType.Equals("BPM"))
- {
- result = -1;
- }
- //else if (this.NoteSpecificType().Equals("SLIDE")&&another.NoteSpecificType().Equals("SLIDE_START")&&this.Key.Equals(another.Key))
- //{
- // result = 1;
- //}
- else result = 0;
- }
- return result;
- }
-
- public bool Equals(Note? other)
- {
- bool result = false;
- if (other != null &&
- this.NoteType.Equals(other.NoteType) &&
- this.Key.Equals(other.Key) &&
- this.EndKey.Equals(other.EndKey) &&
- this.Bar == other.Bar &&
- this.Tick == other.Tick &&
- this.LastLength == other.LastLength &&
- this.BPM == other.BPM)
- {
- result = true;
- }
- return result;
- }
-
- public bool Update()
- {
- // Console.WriteLine("This note has bpm note number of " + this.BPMChangeNotes.Count());
- bool result = false;
- this.tickStamp = this.bar * 384 + this.tick;
- // string noteInformation = "This note is "+this.NoteType+", in tick "+ this.tickStamp+", ";
- //this.tickTimeStamp = this.GetTimeStamp(this.tickStamp);
- this.waitTickStamp = this.tickStamp + this.waitLength;
- //this.waitTimeStamp = this.GetTimeStamp(this.waitTickStamp);
- this.lastTickStamp = this.waitTickStamp + this.lastLength;
- //this.lastTimeStamp = this.GetTimeStamp(this.lastTickStamp);
- if (!(this.NoteType.Equals("SLIDE") || this.NoteType.Equals("HOLD")))
- {
- result = true;
- }
- else if (this.calculatedLastTime > 0 && this.calculatedWaitTime > 0)
- {
- result = true;
- }
- return result;
- }
-
- ///
- /// Replace this.BPMChangeNotes from change table given
- ///
- /// Change table contains bpm notes
- public void ReplaceBPMChanges(BPMChanges changeTable)
- {
- this.bpmChangeNotes = new List();
- this.bpmChangeNotes.AddRange(changeTable.ChangeNotes);
- }
-
- ///
- /// Replace this.BPMChangeNotes from change table given
- ///
- /// Change table contains bpm notes
- public void ReplaceBPMChanges(List changeTable)
- {
- this.bpmChangeNotes = new List();
- this.bpmChangeNotes.AddRange(changeTable);
- }
-
- ///
- /// Generate appropriate length for hold and slide.
- ///
- /// Last Time
- /// [Definition:Length]=[Quaver:Beat]
- public string GenerateAppropriateLength(int length)
- {
- string result = "";
- const int definition = 384;
- int divisor = GCD(definition, length);
- int quaver = definition / divisor, beat = length / divisor;
- result = "[" + quaver.ToString() + ":" + beat.ToString() + "]";
- return result;
- }
-
- ///
- /// Return GCD of A and B.
- ///
- /// A
- /// B
- /// GCD of A and B
- static int GCD(int a, int b)
- {
- return b == 0 ? a : GCD(b, a % b);
- }
-
- ///
- /// Generate appropriate length for hold and slide.
- ///
- /// Last Time
- /// BPM
- /// [Definition:Length]=[Quaver:Beat]
- public string GenerateAppropriateLength(int length, double bpm)
- {
- string result = "";
- double sustain = this.WaitTimeStamp - this.TickTimeStamp;
- double duration = this.LastTimeStamp - this.WaitTimeStamp;
- result = "[" + sustain + "##" + duration + "]";
- return result;
- }
-
- ///
- /// Get BPM Time tick unit of bpm
- ///
- /// BPM to calculate
- /// BPM Tick Unit of bpm
- public static double GetBPMTimeUnit(double bpm)
- {
- double result = 60 / bpm * 4 / 384;
- return result;
- }
-
- public double GetTimeStamp(int overallTick)
- {
- double result = 0.0;
- if (overallTick != 0)
- {
- int maximumBPMIndex = 0;
- for (int i = 0; i < this.bpmChangeNotes.Count; i++)
- {
- if (this.bpmChangeNotes[i].TickStamp <= overallTick)
- {
- maximumBPMIndex = i;
- }
- }
- if (maximumBPMIndex == 0)
- {
- result = GetBPMTimeUnit(this.bpmChangeNotes[0].BPM) * overallTick;
- }
- else
- {
- for (int i = 1; i <= maximumBPMIndex; i++)
- {
- double previousTickTimeUnit = GetBPMTimeUnit(this.bpmChangeNotes[i - 1].BPM);
- result += (this.bpmChangeNotes[i].TickStamp - this.bpmChangeNotes[i - 1].TickStamp) * previousTickTimeUnit;
- }
- double tickTimeUnit = GetBPMTimeUnit(this.bpmChangeNotes[maximumBPMIndex].BPM);
- result += (overallTick - this.bpmChangeNotes[maximumBPMIndex].TickStamp) * tickTimeUnit;
- }
- } //A serious improvement is needed for this method
- return result;
- }
- }
-}
diff --git a/Program.cs b/Program.cs
index fcbe4c0..b148943 100644
--- a/Program.cs
+++ b/Program.cs
@@ -4,6 +4,7 @@
using System.Xml;
using ManyConsole;
using Mono.Options;
+using MaiLib;
namespace MaichartConverter
{
diff --git a/Rest.cs b/Rest.cs
deleted file mode 100644
index 604f77e..0000000
--- a/Rest.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-namespace MaichartConverter
-{
- ///
- /// Construct Rest Note solely for Simai
- ///
- internal class Rest : Note
- {
-
- ///
- /// Construct empty
- ///
- public Rest()
- {
- this.NoteType = "RST";
- this.Bar = 0;
- this.Tick = 0;
- this.Update();
- }
-
- ///
- /// Construct Rest Note with given information
- ///
- /// Note Type to take in
- /// Bar to take in
- /// Start to take in
- public Rest(string noteType, int bar, int startTime)
- {
- this.NoteType = noteType;
- this.Bar = bar;
- this.Tick = startTime;
- this.Update();
- }
-
- ///
- /// Construct with Note provided
- ///
- /// Note to take in
- public Rest(Note n)
- {
- this.NoteType = "RST";
- this.Bar = n.Bar;
- this.Tick = n.Tick;
- this.BPMChangeNotes = n.BPMChangeNotes;
- this.Update();
- }
- public override bool CheckValidity()
- {
- throw new NotImplementedException();
- }
-
- public override string Compose(int format)
- {
- //return "r_" + this.Tick;
- return "";
- }
-
- public override string NoteGenre => "REST";
-
- public override bool IsNote => false;
-
- public override string NoteSpecificType => "REST";
- }
-}
diff --git a/Simai-Depreciated.cs b/Simai-Depreciated.cs
deleted file mode 100644
index 9609a99..0000000
--- a/Simai-Depreciated.cs
+++ /dev/null
@@ -1,250 +0,0 @@
-namespace MaichartConverter
-{
- public class SimaiDepreciated : Chart, ICompiler
- {
- private string title;
- private List difficulty;
- private List noteDesigner;
- private double wholeBPM;
- private List maps;
- public const int Resolution = 384; //Maximum tick of a bar;
- public const string BreakNote = "b", HoldNote = "h", SI_Note = "-", SV_Note = "v", SC_Note = "<>", SL_Note = "V", SX_Note = "p";
- public const string TouchPrefix = "ABCDEF";
- public const string SlideType = "-^vV<>pqszw";
- public SimaiDepreciated(string maidata)
- {
- title = "";
- difficulty = new List();
- noteDesigner = new List();
- maps = new List();
- wholeBPM = 0.00;
- string[] processing = maidata.Split('&');
- foreach (string x in processing)
- {
- if (x.Contains("title"))
- {
- string[] rawTitle = x.Split('=');
- if (rawTitle.Length == 3)
- {
- this.title = rawTitle[2];
- }
- else if (rawTitle.Length >= 3)
- {
- string realTitle = "";
- for (int y = 2; y < rawTitle.Length; y++)
- {
- realTitle += rawTitle[y];
- }
- this.title = realTitle;
- }
- else this.title = "Empty";
- }
- else if (x.Contains("wholebpm"))
- {
- if (x.Split('=').Length == 2)
- {
- this.wholeBPM = Double.Parse(x.Split('=')[1]);
- }
- else this.wholeBPM = 0.00;
- }
- else if (x.Contains("inotes_"))
- {
- if (x.Contains("inotes_1"))
- {
- this.maps.Add(Read(x, 1));
- }
- else if (x.Contains("inotes_2"))
- {
- this.maps.Add(Read(x, 2));
- }
- else if (x.Contains("inotes_3"))
- {
- this.maps.Add(Read(x, 3));
- }
- else if (x.Contains("inotes_4"))
- {
- this.maps.Add(Read(x, 4));
- }
- else if (x.Contains("inotes_5"))
- {
- this.maps.Add(Read(x, 5));
- }
- }
- }
- }
- ///
- /// Takes in maidata section and compose into notes
- ///
- /// string to take in
- /// difficulty to mark
- ///
- public Ma2 Read(string maiNotes, int Difficulty)
- {
- List notes = new List();
- List changedBars = new List(), changedTicks = new List(), changedQuavers = new List(), changedBeats = new List();
- List changedBPMs = new List();
- int bar = 1, tick = 0, quavers = 0;
- double bpm = this.wholeBPM;
-
- string[] processing = maiNotes.Split(')');
- string candidate = maiNotes;
- if (processing.Length >= 2)
- {
- foreach (string x in processing)
- {
- candidate = String.Join(',', processing);
- }
- }
- processing = candidate.Split(',');
- for (int x = 0; x < processing.Length; x++)
- {
- if (processing[x].Contains("("))
- {
- string[] y = processing[x].Split(')');
- double changedBPM = Double.Parse(y[0].Split('(')[1]);
- changedBPMs.Add(changedBPM);
- }
- else if (processing[x].Contains("{"))
- {
- string[] y = processing[x].Split('}');
- quavers = int.Parse(y[0].Split('}')[1]);
- }
- else notes.AddRange(Read(processing[x], bar, tick));
- tick += Resolution / quavers;
- if (tick >= Resolution)
- {
- bar++;
- tick = 0;
- }
- }
- BPMChanges bpmChanges = new BPMChanges(changedBars, changedTicks, changedBPMs);
- MeasureChanges measureChanges = new MeasureChanges(changedBars, changedTicks, changedQuavers, changedBeats);
- Ma2 result = new Ma2(notes, bpmChanges, measureChanges);
- return result;
- }
-
- public static List Read(string section, int bar, int tick)
- {
- List result = new List();
- if (section.Contains("/"))
- {
- string[] deeperSection = section.Split('/');
- foreach (string x in deeperSection)
- {
- result.AddRange(Read(x, bar, tick));
- }
- }
- else if (section.Contains("*"))
- {
- string[] deeperSection = section.Split('*');
- for (int x = 1; x < deeperSection.Length; x++)
- {
- deeperSection[x] = section.ToCharArray()[0] + deeperSection[x];
- }//Generate Slide Start for Each-Slides.
- foreach (string x in deeperSection)
- {
- result.AddRange(Read(x, bar, tick));
- }
- }
- else if (int.TryParse(section, out int each))
- {
- char[] eachGroup = each.ToString().ToCharArray();
- if (eachGroup.Length >= 2)
- {
- foreach (char x in eachGroup)
- {
- result.Add(new Tap("TAP", bar, tick, x.ToString()));
- }
- }
- }
- else if (section.Length == 3 && section.Contains(BreakNote))
- {
- result.Add(new Tap("BRK", bar, tick, section.Remove(section.Length - 1)));
- }
- else if (section.Length == 2 && section.IndexOfAny(TouchPrefix.ToCharArray()) == 0)
- {
- result.Add(new Tap("TTP", bar, tick, section.Substring(1)));
- }
- else if (section.Contains(HoldNote))
- {
- string[] holdCandidate = section.Split('h');
- string[] holdTime = holdCandidate[1].Substring(1).Remove(section.Length - 1).Split(':');
- int holdQuaver = int.Parse(holdTime[0]);
- int holdMultiple = int.Parse(holdTime[1]);
- if (holdCandidate[0].Equals("C"))
- {
- result.Add(new Hold("THO", bar, tick, "C1", (Resolution / holdQuaver) * holdMultiple));
- }
- else if (holdCandidate[0].Contains("x"))
- {
- char[] xIncluded = holdCandidate[0].ToCharArray();
- string xExcluded = ""; //Real key exclude X for XHO mark
- foreach (char x in xIncluded)
- {
- if (x.Equals('x'))
- {
- xExcluded += x;
- }
- }
- result.Add(new Hold("XHD", bar, tick, xExcluded, (Resolution / holdQuaver) * holdMultiple));
- }
- else result.Add(new Hold("HLD", bar, tick, holdCandidate[0], (Resolution / holdQuaver) * holdMultiple));
- }
- else if (section.IndexOfAny(SlideType.ToCharArray()) >= 0)
- {
- string[] typeCandidate = section.Split('[');
- string timeCandidate = typeCandidate[1].Substring(0, typeCandidate[1].Length - 1);
- string[] quaverCandidate = timeCandidate.Split(':');
- int overrideQuaver = Resolution / int.Parse(quaverCandidate[0]);
- //int last = 0;
- if (section.Contains("-"))
- {
-
- }
- else if (section.Contains("^"))
- {
-
- }
- else if (section.Contains("v") || section.Contains("V"))
- {
-
- }
- else if (section.Contains("<") || section.Contains(">"))
- {
-
- }
- else if (section.Contains("p") || section.Contains("q"))
- {
-
- }
- else if (section.Contains("s") || section.Contains("z"))
- {
-
- }
- else if (section.Contains("w"))
- {
-
- }
-
- }
- return result;
- }
-
- public override string Compose()
- {
- throw new NotImplementedException();
- }
-
- public override bool CheckValidity()
- {
- bool result = this == null;
- // Not yet implemented
- return result;
- }
-
- public override string Compose(BPMChanges bpm, MeasureChanges measure)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/Simai.cs b/Simai.cs
deleted file mode 100644
index ff67d68..0000000
--- a/Simai.cs
+++ /dev/null
@@ -1,160 +0,0 @@
-namespace MaichartConverter
-{
- public class Simai : Chart
- {
- ///
- /// Empty constructor
- ///
- public Simai()
- {
- this.Notes = new List();
- this.BPMChanges = new BPMChanges();
- this.MeasureChanges = new MeasureChanges();
- this.StoredChart = new List>();
- this.Information = new Dictionary();
- }
-
- ///
- /// Construct Simai from given parameters
- ///
- /// Notes to take in
- /// BPM change to take in
- /// Measure change to take in
- public Simai(List notes, BPMChanges bpmChanges, MeasureChanges measureChanges)
- {
- this.Notes = notes;
- this.BPMChanges = bpmChanges;
- this.MeasureChanges = measureChanges;
- this.StoredChart = new List>();
- this.Information = new Dictionary();
- this.Update();
- }
-
- public Simai(Chart takenIn)
- {
- this.Notes = takenIn.Notes;
- this.BPMChanges = takenIn.BPMChanges;
- this.MeasureChanges = takenIn.MeasureChanges;
- this.StoredChart = new List>();
- this.Information = new Dictionary();
- this.Update();
- }
-
- public override string Compose()
- {
- string result = "";
- int delayBar = (this.TotalDelay) / 384 + 2;
- //Console.WriteLine(chart.Compose());
- //foreach (BPMChange x in chart.BPMChanges.ChangeNotes)
- //{
- // Console.WriteLine("BPM Change verified in " + x.Bar + " " + x.Tick + " of BPM" + x.BPM);
- //}
- List firstBpm = new List();
- foreach (Note bpm in this.Notes)
- {
- if (bpm.NoteSpecificType.Equals("BPM"))
- {
- firstBpm.Add(bpm);
- }
- }
- // if (firstBpm.Count > 1)
- // {
- // chart.Chart[0][0] = firstBpm[1];
- // }
- foreach (List bar in this.StoredChart)
- {
- Note lastNote = new MeasureChange();
- //result += bar[1].Bar;
- foreach (Note x in bar)
- {
- switch (lastNote.NoteSpecificType)
- {
- case "MEASURE":
- break;
- case "BPM":
- break;
- case "TAP":
- if (x.IsNote && ((!x.NoteSpecificType.Equals("SLIDE")) && x.Tick == lastNote.Tick && !x.NoteGenre.Equals("BPM")))
- {
- result += "/";
- }
- else result += ",";
- break;
- case "HOLD":
- if (x.IsNote && (!x.NoteSpecificType.Equals("SLIDE")) && x.Tick == lastNote.Tick && !x.NoteGenre.Equals("BPM"))
- {
- result += "/";
- }
- else result += ",";
- break;
- case "SLIDE_START":
- //if (x.IsNote() && x.NoteSpecificType().Equals("SLIDE"))
- //{
-
- //}
- break;
- case "SLIDE":
- if (x.IsNote && (!x.NoteSpecificType.Equals("SLIDE")) && x.Tick == lastNote.Tick && !x.NoteGenre.Equals("BPM"))
- {
- result += "/";
- }
- else if (x.IsNote && x.NoteSpecificType.Equals("SLIDE") && x.Tick == lastNote.Tick && !x.NoteGenre.Equals("BPM"))
- {
- result += "*";
- }
- else result += ",";
- break;
- default:
- result += ",";
- break;
- }
- result += x.Compose(0);
- lastNote = x;
- //if (x.NoteGenre().Equals("BPM"))
- //{
- // result+="("+ x.Bar + "_" + x.Tick + ")";
- //}
- }
- result += ",\n";
- }
- //if (delayBar>0)
- //{
- // Console.WriteLine("TOTAL DELAYED BAR: "+delayBar);
- //}
- for (int i = 0; i < delayBar + 1; i++)
- {
- result += "{1},\n";
- }
- result += "E\n";
- return result;
- }
-
- public override bool CheckValidity()
- {
- bool result = this == null;
- // Not yet implemented
- return result;
- }
-
- ///
- /// Reconstruct the chart with given arrays
- ///
- /// New BPM Changes
- /// New Measure Changes
- /// New Composed Chart
- public override string Compose(BPMChanges bpm, MeasureChanges measure)
- {
- BPMChanges sourceBPM = this.BPMChanges;
- MeasureChanges sourceMeasures = this.MeasureChanges;
- this.BPMChanges = bpm;
- this.MeasureChanges = measure;
- this.Update();
-
- string result = this.Compose();
- this.BPMChanges = sourceBPM;
- this.MeasureChanges = sourceMeasures;
- this.Update();
- return result;
- }
- }
-}
\ No newline at end of file
diff --git a/SimaiCompiler.cs b/SimaiCompiler.cs
deleted file mode 100644
index b9bc9b2..0000000
--- a/SimaiCompiler.cs
+++ /dev/null
@@ -1,445 +0,0 @@
-using System.Collections.Immutable;
-using System.ComponentModel;
-using System.Xml;
-
-namespace MaichartConverter
-{
- ///
- /// Compile various Ma2 charts
- ///
- public class SimaiCompiler : ICompiler
- {
- ///
- /// Store difficulty keywords
- ///
- /// Difficulty
- public static readonly string[] difficulty = { "Basic", "Advanced", "Expert", "Master", "Remaster", "Utage" };
-
- ///
- /// Store chart collections
- ///
- private List charts;
-
- ///
- /// Store global information
- ///
- private Dictionary information;
-
- ///
- /// Store read in music XML file
- ///
- private XmlInformation musicXml;
-
- ///
- /// Construct compiler of a single song.
- ///
- /// Folder
- /// Output folder
- public SimaiCompiler(string location, string targetLocation)
- {
- charts = new List();
- for (int i = 0; i < 5; i++)
- {
- charts.Add(new Ma2());
- }
- this.musicXml = new XmlInformation(location);
- this.information = musicXml.Information;
- //Construct charts
- {
- if (!this.information["Basic"].Equals(""))
- {
- //Console.WriteLine("Have basic: "+ location + this.information.GetValueOrDefault("Basic Chart Path"));
- charts[0] = new Ma2(location + this.information.GetValueOrDefault("Basic Chart Path"));
- }
- if (!this.information["Advanced"].Equals(""))
- {
- charts[1] = new Ma2(location + this.information.GetValueOrDefault("Advanced Chart Path"));
- }
- if (!this.information["Expert"].Equals(""))
- {
- charts[2] = new Ma2(location + this.information.GetValueOrDefault("Expert Chart Path"));
- }
- if (!this.information["Master"].Equals(""))
- {
- charts[3] = new Ma2(location + this.information.GetValueOrDefault("Master Chart Path"));
- }
- if (!this.information["Remaster"].Equals(""))
- {
- charts[4] = new Ma2(location + this.information.GetValueOrDefault("Remaster Chart Path"));
- }
- }
- string result = this.Compose();
- //Console.WriteLine(result);
- StreamWriter sw = new StreamWriter(targetLocation + Program.GlobalSep + "maidata.txt", false);
- {
- sw.WriteLine(result);
- }
- sw.Close();
- }
-
- ///
- /// Construct compiler of a single song.
- ///
- /// Folder
- /// Output folder
- /// True if for utage
- public SimaiCompiler(string location, string targetLocation, bool forUtage)
- {
- string[] ma2files = Directory.GetFiles(location, "*.ma2");
- charts = new List();
- this.musicXml = new XmlInformation(location);
- this.information = musicXml.Information;
- foreach (string ma2file in ma2files)
- {
- charts.Add(new Ma2(ma2file));
- }
-
- List ma2List = new List();
- ma2List.AddRange(ma2files);
-
- string result = this.Compose(true, ma2List);
- //Console.WriteLine(result);
- StreamWriter sw = new StreamWriter(targetLocation + Program.GlobalSep + "maidata.txt", false);
- {
- sw.WriteLine(result);
- }
- sw.Close();
- }
-
- ///
- /// Empty constructor.
- ///
- public SimaiCompiler()
- {
- charts = new List();
- information = new Dictionary();
- this.musicXml = new XmlInformation();
- }
-
- public bool CheckValidity()
- {
- bool result = true;
- foreach (Chart x in charts)
- {
- result = result && x.CheckValidity();
- }
- return result;
- }
-
- public string Compose()
- {
- string result = "";
- //Add information
- {
- string beginning = "";
- beginning += "&title=" + this.information.GetValueOrDefault("Name") + this.information.GetValueOrDefault("SDDX Suffix") + "\n";
- beginning += "&wholebpm=" + this.information.GetValueOrDefault("BPM") + "\n";
- beginning += "&artist=" + this.information.GetValueOrDefault("Composer") + "\n";
- beginning += "&des=" + this.information.GetValueOrDefault("Master Chart Maker") + "\n";
- beginning += "&shortid=" + this.information.GetValueOrDefault("Music ID") + "\n";
- beginning += "&genre=" + this.information.GetValueOrDefault("Genre") + "\n";
- beginning += "&cabinet=";
- if (this.musicXml.IsDXChart)
- {
- beginning += "DX\n";
- }
- else
- {
- beginning += "SD\n";
- }
- beginning += "&version=" + this.musicXml.TrackVersion + "\n";
- beginning += "&chartconverter=Neskol\n";
- beginning += "\n";
-
-
- if (this.information.TryGetValue("Basic", out string? basic) && this.information.TryGetValue("Basic Chart Maker", out string? basicMaker))
-
-
- {
- beginning += "&lv_2=" + basic + "\n";
- beginning += "&des_2=" + basicMaker + "\n";
- beginning += "\n";
- }
-
-
- if (this.information.TryGetValue("Advanced", out string? advance) && this.information.TryGetValue("Advanced Chart Maker", out string? advanceMaker))
- {
- beginning += "&lv_3=" + advance + "\n";
- beginning += "&des_3=" + advanceMaker + "\n";
- beginning += "\n";
- }
-
-
- if (this.information.TryGetValue("Expert", out string? expert) && this.information.TryGetValue("Expert Chart Maker", out string? expertMaker))
- {
- beginning += "&lv_4=" + expert + "\n";
- beginning += "&des_4=" + expertMaker + "\n";
- beginning += "\n";
- }
-
-
- if (this.information.TryGetValue("Master", out string? master) && this.information.TryGetValue("Master Chart Maker", out string? masterMaker))
- {
- beginning += "&lv_5=" + master + "\n";
- beginning += "&des_5=" + masterMaker + "\n";
- beginning += "\n";
- }
-
-
- if (this.information.TryGetValue("Remaster", out string? remaster) && this.information.TryGetValue("Remaster Chart Maker", out string? remasterMaker))
- {
- beginning += "&lv_6=" + remaster + "\n";
- beginning += "&des_6=" + remasterMaker; beginning += "\n";
- beginning += "\n";
- }
- result += beginning;
- }
- Console.WriteLine("Finished writing header of " + this.information.GetValueOrDefault("Name"));
-
- //Compose charts
- {
- for (int i = 0; i < this.charts.Count; i++)
- {
- // Console.WriteLine("Processing chart: " + i);
- if (!this.information[difficulty[i]].Equals(""))
- {
- string? isDxChart = this.information.GetValueOrDefault("SDDX Suffix");
- if (!charts[i].IsDXChart)
- {
- isDxChart = "";
- }
- result += "&inote_" + (i + 2) + "=\n";
- result += this.Compose(charts[i]);
- Program.CompiledChart.Add(this.information.GetValueOrDefault("Name") + isDxChart + " [" + difficulty[i] + "]");
- }
- result += "\n";
- }
- }
- Console.WriteLine("Finished composing.");
- return result;
- }
-
- ///
- /// Return compose of specified chart.
- ///
- /// Chart to compose
- /// Maidata of specified chart WITHOUT headers
- public string Compose(Chart chart)
- {
- string result = "";
- int delayBar = (chart.TotalDelay) / 384 + 2;
- //Console.WriteLine(chart.Compose());
- //foreach (BPMChange x in chart.BPMChanges.ChangeNotes)
- //{
- // Console.WriteLine("BPM Change verified in " + x.Bar + " " + x.Tick + " of BPM" + x.BPM);
- //}
- List firstBpm = new List();
- foreach (Note bpm in chart.Notes)
- {
- if (bpm.NoteSpecificType.Equals("BPM"))
- {
- firstBpm.Add(bpm);
- }
- }
- // if (firstBpm.Count > 1)
- // {
- // chart.Chart[0][0] = firstBpm[1];
- // }
- foreach (List bar in chart.StoredChart)
- {
- Note lastNote = new MeasureChange();
- //result += bar[1].Bar;
- foreach (Note x in bar)
- {
- switch (lastNote.NoteSpecificType)
- {
- case "MEASURE":
- break;
- case "BPM":
- break;
- case "TAP":
- if (x.IsNote && ((!x.NoteSpecificType.Equals("SLIDE")) && x.Tick == lastNote.Tick && !x.NoteGenre.Equals("BPM")))
- {
- result += "/";
- }
- else result += ",";
- break;
- case "HOLD":
- if (x.IsNote && (!x.NoteSpecificType.Equals("SLIDE")) && x.Tick == lastNote.Tick && !x.NoteGenre.Equals("BPM"))
- {
- result += "/";
- }
- else result += ",";
- break;
- case "SLIDE_START":
- //if (x.IsNote() && x.NoteSpecificType().Equals("SLIDE"))
- //{
-
- //}
- break;
- case "SLIDE":
- if (x.IsNote && (!x.NoteSpecificType.Equals("SLIDE")) && x.Tick == lastNote.Tick && !x.NoteGenre.Equals("BPM"))
- {
- result += "/";
- }
- else if (x.IsNote && x.NoteSpecificType.Equals("SLIDE") && x.Tick == lastNote.Tick && !x.NoteGenre.Equals("BPM"))
- {
- result += "*";
- }
- else result += ",";
- break;
- default:
- result += ",";
- break;
- }
- //if (x.Prev!=null&&x.Prev.NoteType.Equals("NST"))
- //if (x.NoteGenre.Equals("SLIDE")&&x.SlideStart== null)
- //{
- // result += Int32.Parse(x.Key) + 1;
- // result += "!";
- //}
- result += x.Compose(0);
- lastNote = x;
- //if (x.NoteGenre().Equals("BPM"))
- //{
- // result+="("+ x.Bar + "_" + x.Tick + ")";
- //}
- }
- result += ",\n";
- }
- //if (delayBar>0)
- //{
- // Console.WriteLine("TOTAL DELAYED BAR: "+delayBar);
- //}
- for (int i = 0; i < delayBar + 1; i++)
- {
- result += "{1},\n";
- }
- result += "E\n";
- return result;
- }
-
- ///
- /// Compose utage charts
- ///
- /// switch to produce utage
- /// Corresponding utage chart
- public string Compose(bool isUtage, List ma2files)
- {
- string result = "";
- //Add information
-
- string beginning = "";
- beginning += "&title=" + this.information.GetValueOrDefault("Name") + "[宴]" + "\n";
- beginning += "&wholebpm=" + this.information.GetValueOrDefault("BPM") + "\n";
- beginning += "&artist=" + this.information.GetValueOrDefault("Composer") + "\n";
- beginning += "&des=" + this.information.GetValueOrDefault("Master Chart Maker") + "\n";
- beginning += "&shortid=" + this.information.GetValueOrDefault("Music ID") + "\n";
- beginning += "&genre=" + this.information.GetValueOrDefault("Genre") + "\n";
- beginning += "&cabinate=SD";
- beginning += "&version=" + this.musicXml.TrackVersion + "\n";
- beginning += "&chartconverter=Neskol\n";
- beginning += "\n";
-
- int defaultChartIndex = 7;
- if (ma2files.Count > 1)
- {
- defaultChartIndex = 0;
- }
-
- foreach (string ma2file in ma2files)
- {
- beginning += "&lv_" + defaultChartIndex + "=" + "宴" + "\n";
- beginning += "\n";
- }
-
- result += beginning;
- Console.WriteLine("Finished writing header of " + this.information.GetValueOrDefault("Name"));
-
- //Compose charts
-
- if (defaultChartIndex < 7)
- {
- for (int i = 0; i < this.charts.Count; i++)
- {
- // Console.WriteLine("Processing chart: " + i);
- if (!this.information[difficulty[i]].Equals(""))
- {
- string? isDxChart = "Utage";
- result += "&inote_" + (i + 2) + "=\n";
- result += this.Compose(charts[i]);
- Program.CompiledChart.Add(this.information.GetValueOrDefault("Name") + isDxChart + " [" + difficulty[i] + "]");
- }
- result += "\n";
- }
- }
- else
- {
- result += "&inote_7=\n";
- result += this.Compose(charts[0]);
- Program.CompiledChart.Add(this.information.GetValueOrDefault("Name") + "Utage" + " [宴]");
- }
-
- Console.WriteLine("Finished composing.");
- return result;
- }
-
- public void TakeInformation(Dictionary information)
- {
- this.information = information;
- }
-
- ///
- /// Return the chart bpm change table of MaiCompiler
- ///
- /// First BPM change table of this.charts
- public BPMChanges SymbolicBPMTable()
- {
- BPMChanges bpmTable = new BPMChanges();
- bool foundTable = false;
- for (int i = 0; i < this.charts.Count && !foundTable; i++)
- {
- if (this.charts[i] != null)
- {
- bpmTable = this.charts[i].BPMChanges;
- foundTable = true;
- }
- }
- return bpmTable;
- }
-
- ///
- /// Return the first note of master chart
- ///
- /// The first note of the master chart, or first note of the Utage chart if isUtage is turned true
- /// Throws null reference exception if the chart does not exist
- public Note SymbolicFirstNote(bool isUtage)
- {
- if (!isUtage)
- {
- return this.charts[3].FirstNote ?? throw new NullReferenceException("Null first note: master chart is invalid");
- }
- else if(isUtage)
- {
- return this.charts[0].FirstNote ?? throw new NullReferenceException("Null first note: utage chart is invalid");
- }
- else throw new NullReferenceException("This compiler contains invalid Master Chart and is not Utage Chart: no first note is returned");
- }
-
- ///
- /// Generate one line summary of this track with ID, name, genere and difficulty
- ///
- ///
- public string GenerateOneLineSummary()
- {
- string result = "";
- if (this.charts.Equals(null) || !this.CheckValidity())
- {
- throw new NullReferenceException("This compiler has empty chat list!");
- }
- result += "(" + this.information["Music ID"] + ")"+this.information["Name"]+", "+this.information["Genre"]+", ";
-
- return result;
- }
- }
-}
diff --git a/SimaiTokenizer.cs b/SimaiTokenizer.cs
deleted file mode 100644
index a480bbf..0000000
--- a/SimaiTokenizer.cs
+++ /dev/null
@@ -1,245 +0,0 @@
-using System;
-using System.IO;
-using System.Runtime.CompilerServices;
-using System.Xml.Serialization;
-
-namespace MaichartConverter
-{
- ///
- /// Tokenize input file into tokens that parser can read
- ///
- public class SimaiTokenizer : ITokenizer
- {
- ///
- /// Stores the candidates of charts
- ///
- private Dictionary chartCandidates;
-
- ///
- /// Stores the information to read
- ///
- private TrackInformation simaiTrackInformation;
-
- ///
- /// Constructs a tokenizer
- ///
- public SimaiTokenizer()
- {
- this.simaiTrackInformation = new XmlInformation();
- this.chartCandidates = new Dictionary();
- }
-
- ///
- /// Access the chart candidates
- ///
- public Dictionary ChartCandidates
- {
- get { return this.chartCandidates; }
- }
-
-
- ///
- /// Update candidates from texts specified
- ///
- /// Text to be tokenized
- public void UpdateFromText(string input)
- {
- string storage = input;
- string[] result = storage.Split("&");
- string titleCandidate = "";
- string bpmCandidate = "";
- string artistCandidate = "";
- string chartDesigner = "";
- string shortIdCandidate = "";
- string genreCandidate = "";
- string versionCandidate = "";
-
- foreach (string item in result)
- {
- if (item.Contains("title"))
- {
- titleCandidate = item.Replace("title=","").Replace("[SD]","").Replace("[DX]","");
- this.simaiTrackInformation.Information["Name"] = titleCandidate;
- }
- else if(item.Contains("wholebpm"))
- {
- bpmCandidate = item.Replace("wholebpm=", "");
- this.simaiTrackInformation.Information["BPM"] = bpmCandidate;
- }
- else if (item.Contains("artist"))
- {
- artistCandidate = item.Replace("artist=", "");
- this.simaiTrackInformation.Information["Composer"] = artistCandidate;
- }
- else if (item.Contains("des="))
- {
- chartDesigner = item.Replace("des=", "");
- }
- else if (item.Contains("shortid"))
- {
- shortIdCandidate = item.Replace("shortid=", "");
- this.simaiTrackInformation.Information["Music ID"] = shortIdCandidate;
- if (shortIdCandidate.Length<=6 && int.TryParse(shortIdCandidate,out int id))
- {
- if (shortIdCandidate.Length>4)
- {
- this.simaiTrackInformation.Information["SDDX Suffix"] = "DX";
- }
- else this.simaiTrackInformation.Information["SDDX Suffix"] = "SD";
- }
- }
- else if (item.Contains("genre"))
- {
- genreCandidate = item.Replace("genre=", "");
- this.simaiTrackInformation.Information["Genre"] = genreCandidate;
- }
- else if (item.Contains("version"))
- {
- versionCandidate = item.Replace("version=", "");
- this.simaiTrackInformation.Information["Version"] = versionCandidate;
- }
- else if (item.Contains("lv_1"))
- {
- string easyCandidate = item.Replace("lv_1=", "");
- this.simaiTrackInformation.Information["Easy"] = easyCandidate;
- }
- else if (item.Contains("des_1"))
- {
- string easyChartCandidate = item.Replace("des_1=", "");
- this.simaiTrackInformation.Information["Easy Chart Maker"] = easyChartCandidate;
- }
- else if (item.Contains("lv_2"))
- {
- string basicCandidate = item.Replace("lv_2=", "");
- this.simaiTrackInformation.Information["Basic"] = basicCandidate;
- }
- else if (item.Contains("des_2"))
- {
- string basicChartCandidate = item.Replace("des_2=", "");
- this.simaiTrackInformation.Information["Basic Chart Maker"] = basicChartCandidate;
- }
- else if (item.Contains("lv_3"))
- {
- string advancedCandidate = item.Replace("lv_3=", "");
- this.simaiTrackInformation.Information["Advanced"] = advancedCandidate;
- }
- else if (item.Contains("des_3"))
- {
- string advancedChartCandidate = item.Replace("des_3=", "");
- this.simaiTrackInformation.Information["Advanced Chart Maker"] = advancedChartCandidate;
- }
- else if (item.Contains("lv_4"))
- {
- string expertCandidate = item.Replace("lv_4=", "");
- this.simaiTrackInformation.Information["Expert"] = expertCandidate;
- }
- else if (item.Contains("des_4"))
- {
- string expertChartCandidate = item.Replace("des_4=", "");
- this.simaiTrackInformation.Information["Expert Chart Maker"] = expertChartCandidate;
- }
- else if (item.Contains("lv_5"))
- {
- string masterCandidate = item.Replace("lv_5=", "");
- this.simaiTrackInformation.Information["Master"] = masterCandidate;
- }
- else if (item.Contains("des_5"))
- {
- string masterChartCandidate = item.Replace("des_5=", "");
- this.simaiTrackInformation.Information["Master Chart Maker"] = masterChartCandidate;
- }
- else if (item.Contains("lv_6"))
- {
- string remasterCandidate = item.Replace("lv_6=", "");
- this.simaiTrackInformation.Information["Remaster"] = remasterCandidate;
- }
- else if (item.Contains("des_6"))
- {
- string remasterChartCandidate = item.Replace("des_6=", "");
- this.simaiTrackInformation.Information["Remaster Chart Maker"] = remasterChartCandidate;
- }
- else if (item.Contains("lv_7"))
- {
- string utageCandidate = item.Replace("lv_7=", "");
- this.simaiTrackInformation.Information["Utage"] = utageCandidate;
- }
- else if (item.Contains("des_7"))
- {
- string utageChartCandidate = item.Replace("des_7=", "");
- this.simaiTrackInformation.Information["Utage Chart Maker"] = utageChartCandidate;
- }
- else if (item.Contains("inote_2"))
- {
- string noteCandidate = item.Replace("inote_2=", "");
- this.chartCandidates.Add("2", this.TokensFromText(noteCandidate));
- }
- else if (item.Contains("inote_3"))
- {
- string noteCandidate = item.Replace("inote_3=", "");
- this.chartCandidates.Add("3", this.TokensFromText(noteCandidate));
- }
- else if (item.Contains("inote_4"))
- {
- string noteCandidate = item.Replace("inote_4=", "");
- this.chartCandidates.Add("4", this.TokensFromText(noteCandidate));
- }
- else if (item.Contains("inote_5"))
- {
- string noteCandidate = item.Replace("inote_5=", "");
- this.chartCandidates.Add("5", this.TokensFromText(noteCandidate));
- }
- else if (item.Contains("inote_6"))
- {
- string noteCandidate = item.Replace("inote_6=", "");
- this.chartCandidates.Add("6", this.TokensFromText(noteCandidate));
- }
- else if (item.Contains("inote_7"))
- {
- string noteCandidate = item.Replace("inote_7=", "");
- this.chartCandidates.Add("7", this.TokensFromText(noteCandidate));
- }
- else if (item.Contains("inote_"))
- {
- string noteCandidate = item.Replace("inote_=", "");
- this.chartCandidates.Add("Default", this.TokensFromText(noteCandidate));
- }
- }
- }
-
- ///
- /// Update candidates from texts specified
- ///
- /// Location of text to be tokenized
- public void UpdateFromPath(string path)
- {
- string[] takeIn = File.ReadAllLines(path);
- string storage = "";
- foreach (string line in takeIn)
- {
- storage += line;
- }
- this.UpdateFromText(storage);
- }
-
- public string[] Tokens(string location)
- {
-
- string[] takeIn = File.ReadAllLines(location);
- string storage = "";
- foreach (string line in takeIn)
- {
- storage += line;
- }
- string[] result = storage.Split(",");
- return result;
- }
-
- public string[] TokensFromText(string text)
- {
- string storage = text;
- string[] result = storage.Split(",");
- return result;
- }
- }
-}
-
diff --git a/Simaiparser.cs b/Simaiparser.cs
deleted file mode 100644
index cfad3e3..0000000
--- a/Simaiparser.cs
+++ /dev/null
@@ -1,825 +0,0 @@
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace MaichartConverter;
-
-///
-/// Parse charts in Simai format
-///
-public class SimaiParser : IParser
-{
- ///
- /// The maximum definition of a chart
- ///
- public static int MaximumDefinition = 384;
-
- private Tap PreviousSlideStart;
-
- ///
- /// Constructor of simaiparser
- ///
- public SimaiParser()
- {
- PreviousSlideStart = new Tap();
- }
-
- ///
- /// Parse BPM change notes
- ///
- /// The parsed set of BPM change
- /// Error: simai does not have this variable
- public BPMChanges BPMChangesOfToken(string token)
- {
- throw new NotImplementedException("Simai does not have this component");
- }
-
- public Chart ChartOfToken(string[] tokens)
- // Note: here chart will only return syntax after &inote_x= and each token is separated by ","
- {
- List notes = new List();
- BPMChanges bpmChanges = new BPMChanges();
- MeasureChanges measureChanges = new MeasureChanges(4, 4);
- int bar = 0;
- int tick = 0;
- double currentBPM = 0.0;
- int tickStep = 0;
- for (int i = 0; i < tokens.Length; i++)
- {
- List eachPairCandidates = EachGroupOfToken(tokens[i]);
- foreach (string eachNote in eachPairCandidates)
- {
- Note noteCandidate = NoteOfToken(eachNote, bar, tick, currentBPM);
- bool containsBPM = noteCandidate.NoteSpecificType.Equals("BPM");
- bool containsMeasure = noteCandidate.NoteSpecificType.Equals("MEASURE");
-
- if (containsBPM)
- {
- string bpmCandidate = eachNote.Replace("(", "").Replace(")", "");
- noteCandidate = new BPMChange(bar, tick, Double.Parse(bpmCandidate));
- //notes.Add(changeNote);
- currentBPM = noteCandidate.BPM;
- bpmChanges.Add((BPMChange)noteCandidate);
- }
- else if (containsMeasure)
- {
- string quaverCandidate = eachNote.Replace("{", "").Replace("}", "");
- tickStep = MaximumDefinition / Int32.Parse(quaverCandidate);
- MeasureChange changeNote = new MeasureChange(bar, tick, tickStep);
- //notes.Add(changeNote);
- }
-
- else /*if (currentBPM > 0.0)*/
- {
- notes.Add(noteCandidate);
- }
- }
-
-
- tick += tickStep;
- while (tick >= MaximumDefinition)
- {
- tick -= MaximumDefinition;
- bar++;
- }
- }
- Chart result = new Simai(notes, bpmChanges, measureChanges);
- return result;
- }
-
- public Hold HoldOfToken(string token, int bar, int tick, double bpm)
- {
- int sustainSymbol = token.IndexOf("[");
- string keyCandidate = token.Substring(0, sustainSymbol); //key candidate is like tap grammar
- //Console.WriteLine(keyCandidate);
- string sustainCandidate = token.Substring(sustainSymbol + 1).Split("]")[0]; //sustain candidate is like 1:2
- //Console.WriteLine(sustainCandidate);
- string key = "";
- string holdType = "";
- int specialEffect = 0;
- // bool sustainIsSecond = sustainCandidate.Contains("##");
- // if (sustainIsSecond)
- // {
- // string[] secondCandidates = sustainCandidate.Split("##");
-
- // }
- if (keyCandidate.Contains("C"))
- {
- holdType = "THO";
- key = "0C";
- if (keyCandidate.Contains("f"))
- {
- specialEffect = 1;
- }
- }
- else if (keyCandidate.Contains("x"))
- {
- key = keyCandidate.Replace("h", "");
- key = key.Replace("x", "");
- Console.WriteLine(key);
- key = (int.Parse(key) - 1).ToString();
- holdType = "XHO";
- }
- else
- {
- key = keyCandidate.Replace("h", "");
- //Console.WriteLine(key);
- key = (int.Parse(key) - 1).ToString();
- holdType = "HLD";
- }
- string[] lastTimeCandidates = sustainCandidate.Split(":");
- int quaver = int.Parse(lastTimeCandidates[0]);
- int lastTick = 384 / quaver;
- int times = int.Parse(lastTimeCandidates[1]);
- lastTick *= times;
- Hold candidate;
- key.Replace("h", "");
- //Console.WriteLine(key);
- if (holdType.Equals("THO"))
- {
- candidate = new Hold(holdType, bar, tick, key, lastTick, specialEffect, "M1");
- }
- else
- {
- candidate = new Hold(holdType, bar, tick, key, lastTick);
- }
- candidate.BPM = bpm;
- return candidate;
- }
-
- public Hold HoldOfToken(string token)
- {
- throw new NotImplementedException();
- }
-
- public MeasureChanges MeasureChangesOfToken(string token)
- {
- throw new NotImplementedException();
- }
-
- public Note NoteOfToken(string token)
- {
- Note result = new Rest();
- bool isRest = token.Equals("");
- bool isBPM = token.Contains(")");
- bool isMeasure = token.Contains("}");
- bool isSlide = token.Contains("-") ||
- token.Contains("v") ||
- token.Contains("w") ||
- token.Contains("<") ||
- token.Contains(">") ||
- token.Contains("p") ||
- token.Contains("q") ||
- token.Contains("s") ||
- token.Contains("z") ||
- token.Contains("V");
- bool isHold = !isSlide && token.Contains("[");
- if (isSlide)
- {
- result = SlideOfToken(token);
- }
- else if (isHold)
- {
- result = HoldOfToken(token);
- }
- else if (isBPM)
- {
- //throw new NotImplementedException("IsBPM is not supported in simai");
- // string bpmCandidate = token;
- // bpmCandidate.Replace("(", "");
- // bpmCandidate.Replace(")", "");
- //result = new BPMChange(bar, tick, Double.Parse(bpmCandidate));
- }
- else if (isMeasure)
- {
- throw new NotImplementedException("IsMeasure is not supported in simai");
- // string quaverCandidate = token;
- // quaverCandidate.Replace("{", "");
- // quaverCandidate.Replace("}", "");
- //result = new MeasureChange(bar, tick, Int32.Parse(quaverCandidate));
- }
- else
- {
- result = TapOfToken(token);
- }
- return result;
- }
-
- public Note NoteOfToken(string token, int bar, int tick, double bpm)
- {
- Note result = new Rest("RST", bar, tick);
- bool isRest = token.Equals("");
- bool isBPM = token.Contains(")");
- bool isMeasure = token.Contains("}");
- bool isSlide = token.Contains("-") ||
- token.Contains("v") ||
- token.Contains("w") ||
- token.Contains("<") ||
- token.Contains(">") ||
- token.Contains("p") ||
- token.Contains("q") ||
- token.Contains("s") ||
- token.Contains("z") ||
- token.Contains("V");
- bool isHold = !isSlide && token.Contains("[");
-
- if (!isRest)
- {
- if (isSlide)
- {
- result = SlideOfToken(token, bar, tick, PreviousSlideStart, bpm);
- }
- else if (isHold)
- {
- result = HoldOfToken(token, bar, tick, bpm);
- }
- else if (isBPM)
- {
- string bpmCandidate = token.Replace("(", "").Replace(")", "");
- result = new BPMChange(bar, tick, Double.Parse(bpmCandidate));
- }
- else if (isMeasure)
- {
- string quaverCandidate = token.Replace("{", "").Replace("}", "");
- result = new MeasureChange(bar, tick, Int32.Parse(quaverCandidate));
- }
- else if (!token.Equals("E") && !token.Equals(""))
- {
- result = TapOfToken(token, bar, tick, bpm);
- if (result.NoteSpecificType.Equals("SLIDE_START"))
- {
- PreviousSlideStart = (Tap)result;
- }
- }
- }
-
- return result;
- }
-
- public Slide SlideOfToken(string token, int bar, int tick, Note slideStart, double bpm)
- {
- Note slideStartCandidate = new Tap(slideStart);
- Note result;
- string endKeyCandidate = "";
- int sustainSymbol = 0;
- string sustainCandidate = "";
- string noteType = "";
- //Parse first section
- if (token.Contains("qq"))
- {
- endKeyCandidate = token.Substring(2, 1);
- sustainSymbol = token.IndexOf("[");
- sustainCandidate = token.Substring(sustainSymbol + 1).Split("]")[0]; //sustain candidate is like 1:2
- noteType = "SXR";
- }
- else if (token.Contains("q"))
- {
- endKeyCandidate = token.Substring(1, 1);
- sustainSymbol = token.IndexOf("[");
- sustainCandidate = token.Substring(sustainSymbol + 1).Split("]")[0]; //sustain candidate is like 1:2
- noteType = "SUR";
- }
- else if (token.Contains("pp"))
- {
- endKeyCandidate = token.Substring(2, 1);
- sustainSymbol = token.IndexOf("[");
- sustainCandidate = token.Substring(sustainSymbol + 1).Split("]")[0]; //sustain candidate is like 1:2
- noteType = "SXL";
- }
- else if (token.Contains("p"))
- {
- endKeyCandidate = token.Substring(1, 1);
- sustainSymbol = token.IndexOf("[");
- sustainCandidate = token.Substring(sustainSymbol + 1).Split("]")[0]; //sustain candidate is like 1:2
- noteType = "SUL";
- }
- else if (token.Contains("v"))
- {
- endKeyCandidate = token.Substring(1, 1);
- sustainSymbol = token.IndexOf("[");
- sustainCandidate = token.Substring(sustainSymbol + 1).Split("]")[0]; //sustain candidate is like 1:2
- noteType = "SV_";
- }
- else if (token.Contains("w"))
- {
- endKeyCandidate = token.Substring(1, 1);
- sustainSymbol = token.IndexOf("[");
- sustainCandidate = token.Substring(sustainSymbol + 1).Split("]")[0]; //sustain candidate is like 1:2
- noteType = "SF_";
- }
- else if (token.Contains("<"))
- {
- endKeyCandidate = token.Substring(1, 1);
- sustainSymbol = token.IndexOf("[");
- sustainCandidate = token.Substring(sustainSymbol + 1).Split("]")[0]; //sustain candidate is like 1:2
- if (PreviousSlideStart.Key.Equals("0") ||
- PreviousSlideStart.Key.Equals("1") ||
- PreviousSlideStart.Key.Equals("6") ||
- PreviousSlideStart.Key.Equals("7"))
- {
- noteType = "SCL";
- }
- else noteType = "SCR";
-
- }
- else if (token.Contains(">"))
- {
- endKeyCandidate = token.Substring(1, 1);
- sustainSymbol = token.IndexOf("[");
- sustainCandidate = token.Substring(sustainSymbol + 1).Split("]")[0]; //sustain candidate is like 1:2
- if (PreviousSlideStart.Key.Equals("0") ||
- PreviousSlideStart.Key.Equals("1") ||
- PreviousSlideStart.Key.Equals("6") ||
- PreviousSlideStart.Key.Equals("7"))
- {
- noteType = "SCR";
- }
- else noteType = "SCL";
-
- }
- else if (token.Contains("s"))
- {
- endKeyCandidate = token.Substring(1, 1);
- sustainSymbol = token.IndexOf("[");
- sustainCandidate = token.Substring(sustainSymbol + 1).Split("]")[0]; //sustain candidate is like 1:2
- noteType = "SSL";
- }
- else if (token.Contains("z"))
- {
- endKeyCandidate = token.Substring(1, 1);
- sustainSymbol = token.IndexOf("[");
- sustainCandidate = token.Substring(sustainSymbol + 1).Split("]")[0]; //sustain candidate is like 1:2
- noteType = "SSR";
- }
- else if (token.Contains("V"))
- {
- endKeyCandidate = token.Substring(2, 1);
- int sllCandidate = int.Parse(slideStartCandidate.Key) + 2;
- int slrCandidate = int.Parse(slideStartCandidate.Key) - 2;
- int inflectionCandidate = int.Parse(token.Substring(1, 1)) - 1;
- ////Revalue inflection candidate
- //if (inflectionCandidate < 0)
- //{
- // inflectionCandidate += 8;
- //}
- //else if (inflectionCandidate > 7)
- //{
- // inflectionCandidate -= 8;
- //}
-
- //Revalue SLL and SLR candidate
- if (sllCandidate < 0)
- {
- sllCandidate += 8;
- }
- else if (sllCandidate > 7)
- {
- sllCandidate -= 8;
- }
- if (slrCandidate < 0)
- {
- slrCandidate += 8;
- }
- else if (slrCandidate > 7)
- {
- slrCandidate -= 8;
- }
-
- bool isSLL = sllCandidate == inflectionCandidate;
- bool isSLR = slrCandidate == inflectionCandidate;
- sustainSymbol = token.IndexOf("[");
- sustainCandidate = token.Substring(sustainSymbol + 1).Split("]")[0]; //sustain candidate is like 1:2
- if (isSLL)
- {
- noteType = "SLL";
- }
- else if (isSLR)
- {
- noteType = "SLR";
- }
- if (!(isSLL || isSLR))
- {
- Console.WriteLine("Start Key:" + slideStartCandidate.Key);
- Console.WriteLine("Expected inflection point: SLL for " + sllCandidate + " and SLR for " + slrCandidate);
- Console.WriteLine("Actual: " + inflectionCandidate);
- throw new InvalidDataException("THE INFLECTION POINT GIVEN IS NOT MATCHING!");
- }
- }
-
- else if (token.Contains("-"))
- {
- endKeyCandidate = token.Substring(1, 1);
- sustainSymbol = token.IndexOf("[");
- sustainCandidate = token.Substring(sustainSymbol + 1).Split("]")[0]; //sustain candidate is like 1:2
- noteType = "SI_";
- }
-
- //Console.WriteLine("Key Candidate: "+keyCandidate);
- int fixedKeyCandidate = int.Parse(endKeyCandidate) - 1;
- if (fixedKeyCandidate < 0)
- {
- endKeyCandidate += 8;
- }
- bool isSecond = sustainCandidate.Contains("##");
- if (!isSecond)
- {
- string[] lastTimeCandidates = sustainCandidate.Split(":");
- int quaver = int.Parse(lastTimeCandidates[0]);
- int lastTick = 384 / quaver;
- int times = int.Parse(lastTimeCandidates[1]);
- lastTick *= times;
- result = new Slide(noteType, bar, tick, slideStartCandidate.Key, 96, lastTick, fixedKeyCandidate.ToString());
- result.SlideStart = slideStartCandidate;
- }
- else
- {
- string[] timeCandidates = sustainCandidate.Split("##");
- double waitLengthCandidate = double.Parse(timeCandidates[0]);
- double lastLengthCandidate = double.Parse(timeCandidates[1]);
- double tickUnit = Chart.GetBPMTimeUnit(bpm);
- int waitLength = (int)(waitLengthCandidate / tickUnit);
- int lastLength = (int)(lastLengthCandidate / tickUnit);
- result = new Slide(noteType, bar, tick, slideStartCandidate.Key, waitLength, lastLength, fixedKeyCandidate.ToString());
- result.CalculatedWaitTime = waitLengthCandidate;
- result.CalculatedLastTime = lastLengthCandidate;
- result.SlideStart = slideStartCandidate;
- }
-
- result.BPM = bpm;
- return (Slide)result;
- }
-
- public Slide SlideOfToken(string token)
- {
- throw new NotImplementedException();
- }
-
- public Tap TapOfToken(string token, int bar, int tick, double bpm)
- {
- bool isBreak = token.Contains("b");
- bool isEXTap = token.Contains("x");
- bool isTouch = token.Contains("B") ||
- token.Contains("C") ||
- token.Contains("E") ||
- token.Contains("F");
- Tap result = new Tap();
- if (isTouch)
- {
- bool hasSpecialEffect = token.Contains("f");
- int keyCandidate = Int32.Parse(token.Substring(1, 1)) - 1;
- if (hasSpecialEffect)
- {
- result = new Tap("TTP", bar, tick, token.Substring(0, 1) + keyCandidate.ToString(), 1, "M1");
- }
- else result = new Tap("TTP", bar, tick, token.Substring(0, 1) + keyCandidate.ToString(), 0, "M1");
- }
- else if (isEXTap)
- {
- int keyCandidate = Int32.Parse(token.Substring(0, 1)) - 1;
- if (token.Contains("_"))
- {
- result = new Tap("XST", bar, tick, keyCandidate.ToString());
- }
- else
- result = new Tap("XTP", bar, tick, keyCandidate.ToString());
- }
- else if (isBreak)
- {
- int keyCandidate = Int32.Parse(token.Substring(0, 1)) - 1;
- if (token.Contains("_"))
- {
- result = new Tap("BST", bar, tick, keyCandidate.ToString());
- }
- else
- result = new Tap("BRK", bar, tick, keyCandidate.ToString());
- }
- else
- {
- int keyCandidate = Int32.Parse(token.Substring(0, 1)) - 1;
- if (token.Contains("_"))
- {
- result = new Tap("STR", bar, tick, keyCandidate.ToString());
- }
- else if (!token.Equals(""))
- {
- result = new Tap("TAP", bar, tick, keyCandidate.ToString());
- }
-
- }
- result.BPM = bpm;
- return result;
- }
-
- public Tap TapOfToken(string token)
- {
- throw new NotImplementedException();
- }
-
- ///
- /// Deal with old, out-fashioned and illogical Simai Each Groups.
- ///
- /// Tokens that potentially contains each Groups
- /// List of strings that is composed with single note.
- public static List EachGroupOfToken(string token)
- {
- List result = new List();
- bool isSlide = token.Contains("-") ||
- token.Contains("v") ||
- token.Contains("w") ||
- token.Contains("<") ||
- token.Contains(">") ||
- token.Contains("p") ||
- token.Contains("q") ||
- token.Contains("s") ||
- token.Contains("z") ||
- token.Contains("V");
- if (token.Contains("/"))
- {
- string[] candidate = token.Split("/");
- foreach (string tokenCandidate in candidate)
- {
- result.AddRange(EachGroupOfToken(tokenCandidate));
- }
- }
- else if (token.Contains(")") || token.Contains("}"))
- {
- List resultCandidate = ExtractParentheses(token);
- List fixedCandidate = new();
- foreach (string candidate in resultCandidate)
- {
- fixedCandidate.AddRange(ExtractParentheses(candidate));
- }
- foreach (string candidate in fixedCandidate)
- {
- result.AddRange(ExtractEachSlides(candidate));
- }
- } //lol this is the most stupid code I have ever wrote
- else if (Int32.TryParse(token, out int eachPair))
- {
- char[] eachPairs = token.ToCharArray();
- foreach (char x in eachPairs)
- {
- result.Add(x.ToString());
- }
- }
- else if (isSlide)
- {
- //List candidate = EachGroupOfToken(token);
- //foreach (string item in candidate)
- //{
- // result.AddRange(ExtractEachSlides(item));
- //}
- result.AddRange(ExtractEachSlides(token));
- }
- else result.Add(token);
- return result;
- }
-
- ///
- /// Deal with annoying and vigours Parentheses grammar of Simai
- ///
- /// Token that potentially contains multiple slide note
- /// A list of strings extracts each note
- public static List ExtractParentheses(string token)
- {
- List result = new List();
- bool containsBPM = token.Contains(")");
- bool containsMeasure = token.Contains("}");
-
- if (containsBPM)
- {
- string[] tokenCandidate = token.Split(")");
- List tokenResult = new();
- for (int i = 0; i < tokenCandidate.Length; i++)
- {
- string x = tokenCandidate[i];
- if (x.Contains("("))
- {
- x += ")";
- }
- if (!x.Equals(""))
- {
- tokenResult.Add(x);
- }
- }
- result.AddRange(tokenResult);
- }
- else if (containsMeasure)
- {
- string[] tokenCandidate = token.Split("}");
- List tokenResult = new();
- for (int i = 0; i < tokenCandidate.Length; i++)
- {
- string x = tokenCandidate[i];
- if (x.Contains("{"))
- {
- x += "}";
- }
- if (!x.Equals(""))
- {
- tokenResult.Add(x);
- }
- }
- result.AddRange(tokenResult);
- }
- else
- {
- result.Add(token);
- }
- return result;
- }
-
- ///
- /// Deal with annoying and vigours Slide grammar of Simai
- ///
- /// Token that potentially contains multiple slide note
- /// A list of slides extracts each note
- public static List ExtractEachSlides(string token)
- {
- bool isSlide = token.Contains("-") ||
- token.Contains("v") ||
- token.Contains("w") ||
- token.Contains("<") ||
- token.Contains(">") ||
- token.Contains("p") ||
- token.Contains("q") ||
- token.Contains("s") ||
- token.Contains("z") ||
- token.Contains("V");
- List result = new List();
- if (!isSlide)
- {
- result.Add(token);
- }
- else
- {
- if (!token.Contains("*"))
- {
- string splitCandidate = token;
- //Parse first section
- if (splitCandidate.Contains("qq"))
- {
- result.AddRange(splitCandidate.Split("qq"));
- result[0] = result[0] + "_";
- result[1] = "qq" + result[1];
- }
- else if (splitCandidate.Contains("q"))
- {
- result.AddRange(splitCandidate.Split("q"));
- result[0] = result[0] + "_";
- result[1] = "q" + result[1];
- }
- else if (splitCandidate.Contains("pp"))
- {
- result.AddRange(splitCandidate.Split("pp"));
- result[0] = result[0] + "_";
- result[1] = "pp" + result[1];
- }
- else if (splitCandidate.Contains("p"))
- {
- result.AddRange(splitCandidate.Split("p"));
- result[0] = result[0] + "_";
- result[1] = "p" + result[1];
- }
- else if (splitCandidate.Contains("v"))
- {
- result.AddRange(splitCandidate.Split("v"));
- result[0] = result[0] + "_";
- result[1] = "v" + result[1];
- }
- else if (splitCandidate.Contains("w"))
- {
- result.AddRange(splitCandidate.Split("w"));
- result[0] = result[0] + "_";
- result[1] = "w" + result[1];
- }
- else if (splitCandidate.Contains("<"))
- {
- result.AddRange(splitCandidate.Split("<"));
- result[0] = result[0] + "_";
- result[1] = "<" + result[1];
- }
- else if (splitCandidate.Contains(">"))
- {
- result.AddRange(splitCandidate.Split(">"));
- result[0] = result[0] + "_";
- result[1] = ">" + result[1];
- }
- else if (splitCandidate.Contains("s"))
- {
- result.AddRange(splitCandidate.Split("s"));
- result[0] = result[0] + "_";
- result[1] = "s" + result[1];
- }
- else if (splitCandidate.Contains("z"))
- {
- result.AddRange(splitCandidate.Split("z"));
- result[0] = result[0] + "_";
- result[1] = "z" + result[1];
- }
- else if (splitCandidate.Contains("V"))
- {
- result.AddRange(splitCandidate.Split("V"));
- result[0] = result[0] + "_";
- result[1] = "V" + result[1];
- }
- else if (splitCandidate.Contains("-"))
- {
- result.AddRange(splitCandidate.Split("-"));
- result[0] = result[0] + "_";
- result[1] = "-" + result[1];
- }
- }
- else
- {
- string[] components = token.Split("*");
- if (components.Length < 1)
- {
- throw new Exception("SLIDE TOKEN NOT VALID: \n" + token);
- }
- string splitCandidate = components[0];
- //Parse first section
- if (splitCandidate.Contains("qq"))
- {
- result.AddRange(splitCandidate.Split("qq"));
- result[0] = result[0] + "_";
- result[1] = "qq" + result[1];
- }
- else if (splitCandidate.Contains("q"))
- {
- result.AddRange(splitCandidate.Split("q"));
- result[0] = result[0] + "_";
- result[1] = "q" + result[1];
- }
- else if (splitCandidate.Contains("pp"))
- {
- result.AddRange(splitCandidate.Split("pp"));
- result[0] = result[0] + "_";
- result[1] = "pp" + result[1];
- }
- else if (splitCandidate.Contains("p"))
- {
- result.AddRange(splitCandidate.Split("p"));
- result[0] = result[0] + "_";
- result[1] = "p" + result[1];
- }
- else if (splitCandidate.Contains("v"))
- {
- result.AddRange(splitCandidate.Split("v"));
- result[0] = result[0] + "_";
- result[1] = "v" + result[1];
- }
- else if (splitCandidate.Contains("w"))
- {
- result.AddRange(splitCandidate.Split("w"));
- result[0] = result[0] + "_";
- result[1] = "w" + result[1];
- }
- else if (splitCandidate.Contains("<"))
- {
- result.AddRange(splitCandidate.Split("<"));
- result[0] = result[0] + "_";
- result[1] = "<" + result[1];
- }
- else if (splitCandidate.Contains(">"))
- {
- result.AddRange(splitCandidate.Split(">"));
- result[0] = result[0] + "_";
- result[1] = ">" + result[1];
- }
- else if (splitCandidate.Contains("s"))
- {
- result.AddRange(splitCandidate.Split("s"));
- result[0] = result[0] + "_";
- result[1] = "s" + result[1];
- }
- else if (splitCandidate.Contains("z"))
- {
- result.AddRange(splitCandidate.Split("z"));
- result[0] = result[0] + "_";
- result[1] = "z" + result[1];
- }
- else if (splitCandidate.Contains("V"))
- {
- result.AddRange(splitCandidate.Split("V"));
- result[0] = result[0] + "_";
- result[1] = "V" + result[1];
- }
- else if (splitCandidate.Contains("-"))
- {
- result.AddRange(splitCandidate.Split("-"));
- result[0] = result[0] + "_";
- result[1] = "-" + result[1];
- }
- //Add rest of slide: components after * is always
- if (components.Length > 1)
- {
- for (int i = 1; i < components.Length; i++)
- {
- result.Add(components[i]);
- }
- }
- }
- }
- return result;
- }
-}
\ No newline at end of file
diff --git a/Slide.cs b/Slide.cs
deleted file mode 100644
index 0173fc9..0000000
--- a/Slide.cs
+++ /dev/null
@@ -1,215 +0,0 @@
-namespace MaichartConverter
-{
- ///
- /// Construct a Slide note (With START!)
- ///
- public class Slide : Note
- {
- private readonly string[] allowedType = { "SI_", "SV_", "SF_", "SCL", "SCR", "SUL", "SUR", "SLL", "SLR", "SXL", "SXR", "SSL", "SSR" };
-
- ///
- /// Empty Constructor
- ///
- public Slide()
- {
- }
-
- ///
- /// Construct a Slide Note (Valid only if Start Key matches a start!)
- ///
- /// SI_(Straight),SCL,SCR,SV_(Line not intercepting Crossing Center),SUL,SUR,SF_(Wifi),SLL(Infecting Line),SLR(Infecting),SXL(Self winding),SXR(Self winding),SSL,SSR
- /// 0-7
- /// Bar in
- /// Start Time
- /// Last Time
- /// 0-7
- public Slide(string noteType, int bar, int startTime, string key, int waitTime, int lastTime, string endKey)
- {
- this.NoteType = noteType;
- this.Key = key;
- this.Bar = bar;
- this.Tick = startTime;
- this.WaitLength = waitTime;
- this.LastLength = lastTime;
- this.EndKey = endKey;
- this.Delayed = this.WaitLength != 96;
- this.Update();
- }
-
- ///
- /// Construct a Slide from another note
- ///
- /// The intake note
- public Slide(Note inTake)
- {
- this.NoteType = inTake.NoteType;
- this.Key = inTake.Key;
- this.EndKey = inTake.EndKey;
- this.Bar = inTake.Bar;
- this.Tick = inTake.Tick;
- this.TickStamp = inTake.TickStamp;
- this.TickTimeStamp = inTake.TickTimeStamp;
- this.LastLength = inTake.LastLength;
- this.LastTickStamp = inTake.LastTickStamp;
- this.LastTimeStamp = inTake.LastTimeStamp;
- this.WaitLength = inTake.WaitLength;
- this.WaitTickStamp = inTake.WaitTickStamp;
- this.WaitTimeStamp = inTake.WaitTimeStamp;
- this.CalculatedLastTime = inTake.CalculatedLastTime;
- this.CalculatedLastTime = inTake.CalculatedLastTime;
- this.TickBPMDisagree = inTake.TickBPMDisagree;
- this.BPM = inTake.BPM;
- this.BPMChangeNotes = inTake.BPMChangeNotes;
- }
-
- public override bool CheckValidity()
- {
- bool result = false;
- foreach (string x in allowedType)
- {
- result = result || this.NoteType.Equals(x);
- }
- result = result && NoteType.Length == 3;
- result = result && Key.Length <= 2;
- return result;
- }
-
- public override string Compose(int format)
- {
- string result = "";
- if (format == 1)
- {
- result = this.NoteType + "\t" + this.Bar + "\t" + this.Tick + "\t" + this.Key + "\t" + this.WaitLength + "\t" + this.LastLength + "\t" + this.EndKey;
- }
- else if (format == 0)
- {
- switch (this.NoteType)
- {
- case "SI_":
- result += "-";
- break;
- case "SV_":
- result += "v";
- break;
- case "SF_":
- result += "w";
- break;
- case "SCL":
- if (Int32.Parse(this.Key) == 0 || Int32.Parse(this.Key) == 1 || Int32.Parse(this.Key) == 6 || Int32.Parse(this.Key) == 7)
- {
- result += "<";
- }
- else
- result += ">";
- break;
- case "SCR":
- if (Int32.Parse(this.Key) == 0 || Int32.Parse(this.Key) == 1 || Int32.Parse(this.Key) == 6 || Int32.Parse(this.Key) == 7)
- {
- result += ">";
- }
- else
- result += "<";
- break;
- case "SUL":
- result += "p";
- break;
- case "SUR":
- result += "q";
- break;
- case "SSL":
- result += "s";
- break;
- case "SSR":
- result += "z";
- break;
- case "SLL":
- result += "V" + GenerateInflection(this);
- break;
- case "SLR":
- result += "V" + GenerateInflection(this);
- break;
- case "SXL":
- result += "pp";
- break;
- case "SXR":
- result += "qq";
- break;
- }
- if (this.TickBPMDisagree || this.Delayed)
- {
- result += ((Convert.ToInt32(this.EndKey) + 1).ToString()) + GenerateAppropriateLength(this.LastLength, this.BPM);
- }
- else
- {
- result += ((Convert.ToInt32(this.EndKey) + 1).ToString()) + GenerateAppropriateLength(this.LastLength);
- }
- //result += "_" + this.Tick;
- //result += "_" + this.Key;
- }
- return result;
- }
-
- ///
- /// Return inflection point of SLL and SLR
- ///
- /// This note
- /// Infection point of this note
- public static int GenerateInflection(Note x)
- {
- int result = Int32.Parse(x.Key) + 1;
- if (x.NoteType.Equals("SLR"))
- {
- result += 2;
- }
- else if (x.NoteType.Equals("SLL"))
- {
- result -= 2;
- }
-
- if (result > 8)
- {
- result -= 8;
- }
- else if (result < 1)
- {
- result += 8;
- }
-
- if (result == Int32.Parse(x.Key) + 1 || (result == Int32.Parse(x.EndKey) + 1))
- {
- //Deal with result;
- if (result>4)
- {
- result -= 4;
- }
- else if (result<=4)
- {
- result += 4;
- }
-
- //Deal with note type;
- if (x.NoteType.Equals("SLL"))
- {
- x.NoteType = "SLR";
- }
- else if (x.NoteType.Equals("SLR"))
- {
- x.NoteType = "SLL";
- }
- else
- {
- throw new InvalidDataException("INFLECTION POINT IS THE SAME WITH ONE OF THE KEY!");
- }
- }
-
- return result;
- }
-
- public override string NoteGenre => "SLIDE";
-
- public override bool IsNote => true;
-
- public override string NoteSpecificType => "SLIDE";
-
- }
-}
diff --git a/Tap.cs b/Tap.cs
deleted file mode 100644
index a45de77..0000000
--- a/Tap.cs
+++ /dev/null
@@ -1,257 +0,0 @@
-namespace MaichartConverter
-{
- ///
- /// Tap note
- ///
- public class Tap : Note
- {
- ///
- /// Stores if the Touch note have special effect
- ///
- private int specialEffect;
-
- ///
- /// Stores how big the note is: M1 for Regular and L1 for large
- ///
- private string touchSize;
-
- ///
- /// Stores enums of accepting tap notes
- ///
- ///
- private readonly string[] allowedType = { "TAP", "STR", "BRK", "BST", "XTP", "XST", "TTP", "NST", "NSS" };
-
- ///
- /// Empty Constructor Tap Note
- ///
- public Tap()
- {
- this.touchSize="M1";
- this.Update();
- }
-
- ///
- /// Construct a Tap note
- ///
- /// TAP,STR,BRK,BST,XTP,XST,TTP; NST or NSS
- /// 0-7 representing each key
- /// Bar location
- /// Start Location
- public Tap(string noteType, int bar, int startTime, string key)
- {
- this.NoteType = noteType;
- this.Key = key;
- this.Bar = bar;
- this.Tick = startTime;
- this.specialEffect = 0;
- this.touchSize = "M1";
- this.Update();
- }
-
- ///
- /// Construct a Touch note with parameter taken in
- ///
- /// "TTP"
- /// Bar location
- /// Start Location
- /// Key
- /// Effect after touch
- /// L=larger notes M=Regular
- public Tap(string noteType, int bar, int startTime, string key, int specialEffect, string touchSize)
- {
- this.NoteType = noteType;
- this.Key = key;
- this.Bar = bar;
- this.Tick = startTime;
- this.specialEffect = specialEffect;
- this.touchSize = touchSize;
- this.Update();
- }
-
- ///
- /// Construct a Tap note form another note
- ///
- /// The intake note
- /// Will raise exception if touch size is null
- public Tap(Note inTake)
- {
- this.NoteType = inTake.NoteType;
- this.Key = inTake.Key;
- this.EndKey = inTake.EndKey;
- this.Bar = inTake.Bar;
- this.Tick = inTake.Tick;
- this.TickStamp = inTake.TickStamp;
- this.TickTimeStamp = inTake.TickTimeStamp;
- this.LastLength = inTake.LastLength;
- this.LastTickStamp = inTake.LastTickStamp;
- this.LastTimeStamp = inTake.LastTimeStamp;
- this.WaitLength = inTake.WaitLength;
- this.WaitTickStamp = inTake.WaitTickStamp;
- this.WaitTimeStamp = inTake.WaitTimeStamp;
- this.CalculatedLastTime = inTake.CalculatedLastTime;
- this.CalculatedLastTime = inTake.CalculatedLastTime;
- this.TickBPMDisagree = inTake.TickBPMDisagree;
- this.BPM = inTake.BPM;
- this.BPMChangeNotes = inTake.BPMChangeNotes;
- if (inTake.NoteGenre == "TAP")
- {
- this.touchSize = ((Tap)inTake).TouchSize ?? throw new NullReferenceException();
- this.SpecialEffect = ((Tap)inTake).SpecialEffect;
- }
- else
- {
- this.touchSize = "M1";
- this.SpecialEffect = 0;
- }
- }
-
-
- ///
- /// Return this.specialEffect
- ///
- public int SpecialEffect
- {
- get { return this.specialEffect; }
- set { this.specialEffect = value; }
- }
-
- ///
- /// Return this.touchSize
- ///
- public string TouchSize
- {
- get { return this.touchSize; }
- set { this.touchSize = value; }
- }
-
- public override bool CheckValidity()
- {
- bool result = false;
- foreach (string x in allowedType)
- {
- result = result || this.NoteType.Equals(x);
- }
- result = result && NoteType.Length == 3;
- result = result && Key.Length <= 2;
- return result;
- }
-
- public override string Compose(int format)
- {
- string result = "";
- if (format == 1 && !(this.NoteType.Equals("TTP")) && !((this.NoteType.Equals("NST"))||this.NoteType.Equals("NSS")))
- {
- result = this.NoteType + "\t" + this.Bar + "\t" + this.Tick + "\t" + this.Key;
- }
- else if (format == 1 && (this.NoteType.Equals("NST")||this.NoteType.Equals("NSS")))
- {
- result = ""; //NST and NSS is just a place holder for slide
- }
- else if (format == 1 && this.NoteType.Equals("TTP"))
- {
- result = this.NoteType + "\t" +
- this.Bar + "\t" +
- this.Tick + "\t" +
- this.Key.ToCharArray()[1] + "\t" +
- this.Key.ToCharArray()[0] + "\t" +
- this.specialEffect + "\t" +
- this.touchSize; //M1 for regular note and L1 for Larger Note
- }
- else if (format == 0)
- {
- switch (this.NoteType)
- {
- case "TAP":
- result += (Int32.Parse(this.Key) + 1).ToString();
- break;
- case "STR":
- result += (Int32.Parse(this.Key) + 1).ToString();
- break;
- case "BRK":
- result += (Int32.Parse(this.Key) + 1).ToString() + "b";
- break;
- case "BST":
- result += (Int32.Parse(this.Key) + 1).ToString() + "b";
- break;
- case "XTP":
- result += (Int32.Parse(this.Key) + 1).ToString() + "x";
- break;
- case "XST":
- result += (Int32.Parse(this.Key) + 1).ToString() + "x";
- break;
- case "NST":
- result += (Int32.Parse(this.Key) + 1).ToString() + "!";
- break;
- case "NSS":
- result += (Int32.Parse(this.Key) + 1).ToString() + "$";
- break;
- case "TTP":
- result += this.Key.ToCharArray()[1] + ((Convert.ToInt32(this.Key.Substring(0, 1)) + 1).ToString());
- if (this.SpecialEffect == 1)
- {
- result += "f";
- }
- break;
- }
- //result += "_" + this.Tick;
- }
- return result;
- }
-
- public override string NoteGenre => "TAP";
-
- public override bool IsNote
- {
- get
- {
- if (this.NoteType.Equals("NST"))
- {
- return false;
- }
- else return true;
- }
- }
-
- public override string NoteSpecificType
- {
- get
- {
- string result = "";
- switch (this.NoteType)
- {
- case "TAP":
- result += "TAP";
- break;
- case "STR":
- result += "SLIDE_START";
- break;
- case "BRK":
- result += "TAP";
- break;
- case "BST":
- result += "SLIDE_START";
- break;
- case "XTP":
- result += "TAP";
- break;
- case "XST":
- result += "SLIDE_START";
- break;
- case "TTP":
- result += "TAP";
- break;
- case "NST":
- result += "SLIDE_START";
- break;
- case "NSS":
- result += "SLIDE_START";
- break;
- }
-
- return result;
- }
- }
- }
-}
-
-
diff --git a/TrackInformation.cs b/TrackInformation.cs
deleted file mode 100644
index 760921b..0000000
--- a/TrackInformation.cs
+++ /dev/null
@@ -1,1653 +0,0 @@
-using System.Data;
-using System.Xml;
-using System.Xml.Linq;
-
-namespace MaichartConverter
-{
- ///
- /// Use xml to store track information
- ///
- public abstract class TrackInformation : IXmlUtility
- {
- ///
- /// Stores proper difficulties
- ///
- /// 1-15 Maimai level
- public static readonly string[] level = { "1", "2", "3", "4", "5", "6", "7", "7+", "8", "8+", "9", "9+", "10", "10+", "11", "11+", "12", "12+", "13", "13+", "14", "14+", "15", "15+" };
-
- public static readonly string[] difficulty = { "Basic", "Advance", "Expert", "Master", "Remaster", "Utage", "Easy" };
-
- public static readonly string[] addVersion = { "Ver1.00.00" };
-
- ///
- /// Stores the genre name used in information
- ///
- /// 103 = Touhou, 105 = maimai
- public static readonly string[] genre = { "東方Project", "maimai" };
-
- ///
- /// Stores prover maimai versions
- ///
- /// Version name of each generation of Maimai
- public static readonly string[] version = { "maimai", "maimai PLUS", "maimai GreeN", "maimai GreeN PLUS", "maimai ORANGE", "maimai ORANGE PLUS", "maimai PiNK", "maimai PiNK PLUS", "maimai MURASAKi", "maimai MURASAKi PLUS", "maimai MiLK", "maimai MiLK PLUS", "maimai FiNALE", "maimai DX", "maimai DX PLUS", "maimai DX Splash", "maimai DX Splash PLUS", "maimai DX UNiVERSE", "maimai DX UNiVERSE PLUS" };
-
- public static readonly string[] shortVersion = { "maimai", "PLUS", "GreeN", "GreeN PLUS", "ORANGE", "ORANGE PLUS", "PiNK", "PiNK PLUS", "MURASAKi", "MURASAKi PLUS", "MiLK", "MiLK PLUS", "FiNALE", "DX", "DX PLUS", "DX Splash", "DX Splash PLUS", "DX UNiVERSE", "DX UNiVERSE PLUS" };
-
- public static string[] versionArray = {
-"10000",
-"10001",
-"10002",
-"11000",
-"11001",
-"11002",
-"11003",
-"11004",
-"11005",
-"11006",
-"11007",
-"12000",
-"12001",
-"12002",
-"12003",
-"12004",
-"12005",
-"12006",
-"12007",
-"12008",
-"12009",
-"13000",
-"13001",
-"13002",
-"13003",
-"13004",
-"13005",
-"13006",
-"13007",
-"13008",
-"13009",
-"13010",
-"13011",
-"14000",
-"14001",
-"14002",
-"14003",
-"14004",
-"14006",
-"14007",
-"14008",
-"14009",
-"14010",
-"15000",
-"15003",
-"15004",
-"15005",
-"15006",
-"15007",
-"15008",
-"15009",
-"15010",
-"15011",
-"15013",
-"15014",
-"15016",
-"15017",
-"15018",
-"15019",
-"16000",
-"16001",
-"16002",
-"16003",
-"16004",
-"16005",
-"16006",
-"16007",
-"16008",
-"16009",
-"16011",
-"16012",
-"16013",
-"16014",
-"17000",
-"17001",
-"17002",
-"17003",
-"17004",
-"17005",
-"17006",
-"17007",
-"17008",
-"17009",
-"17010",
-"17011",
-"17012",
-"17013",
-"17015",
-"17016",
-"17017",
-"17018",
-"18000",
-"18001",
-"18002",
-"18003",
-"18005",
-"18006",
-"18007",
-"18008",
-"18009",
-"18010",
-"18011",
-"18012",
-"18014",
-"18015",
-"18017",
-"18018",
-"18019",
-"18020",
-"18021",
-"18022",
-"18023",
-"18500",
-"18501",
-"18502",
-"18503",
-"18504",
-"18505",
-"18506",
-"18507",
-"18508",
-"18509",
-"18511",
-"18512",
-"18599",
-"19000",
-"19001",
-"19002",
-"19003",
-"19004",
-"19005",
-"19006",
-"19007",
-"19008",
-"19009",
-"19010",
-"19011",
-"19012",
-"19013",
-"19500",
-"19501",
-"19502",
-"19503",
-"19504",
-"19505",
-"19506",
-"19507",
-"19508",
-"19509",
-"19510",
-"19511",
-"19512",
-"19513",
-"19514",
-"19900",
-"19901",
-"19902",
-"19903",
-"19904",
-"19905",
-"19906",
-"19907",
-"19908",
-"19909",
-"19910",
-"19911",
-"19912",
-"19992",
-"19993",
-"19994",
-"19995",
-"19996",
-"19997",
-"19998",
-"19999",
-"20000",
-"20001",
-"20002",
-"20003",
-"20004",
-"20005",
-"20006",
-"20007",
-"20008",
-"20009",
-"20010",
-"20011",
-"20012",
-"20013",
-"20014",
-"20015",
-"20500",
-"20501",
-"20502",
-"20503",
-"20504",
-"20505",
-"20506",
-"20507",
-"20508",
-"20509",
-"20510",
-"20511",
-"20512",
-"20513",
-"20514",
-"21000",
-"21001",
-"21002",
-"21003",
-"21004",
-"21005",
-"21006",
-"21007",
-"21008",
-"21009",
-"21010",
-"21011",
-"21012",
-"21500",
-"21501",
-"21502",
-"21503",
-"21504",
-"21505",
-"21506",
-"21507",
-"21508",
-"21509",
-"21510",
-"21511",
-"21512",
-"21513",
-"22000",
-"22001",
-"22002",
-"22003",
-"22004",
-"22005",
-"22006",
-"22007",
-"22008",
-"22009",
-"22010",
-"22011",
-"22012",
-"22013",
-"22014",
-"22015",
-"22501",
-"22502",
-"22503",
-"22504",
-"22505",
-};
- public static Dictionary netOpenNameDic = new Dictionary{
-{"0", "Net190711"},
-{"1", "Net190719"},
-{"2", "Net190726"},
-{"3", "Net190809"},
-{"4", "Net190822"},
-{"5", "Net190906"},
-{"6", "Net190920"},
-{"7", "Net191004"},
-{"8", "Net191018"},
-{"9", "Net191024"},
-{"10", "Net191101"},
-{"11", "Net191115"},
-{"12", "Net191129"},
-{"13", "Net191213"},
-{"14", "Net191220"},
-{"15", "Net200110"},
-{"200123", "Net200123"},
-{"200207", "Net200207"},
-{"200214", "Net200214"},
-{"200220", "Net200220"},
-{"200306", "Net200306"},
-{"200320", "Net200320"},
-{"200605", "Net200605"},
-{"200612", "Net200612"},
-{"200619", "Net200619"},
-{"200626", "Net200626"},
-{"200710", "Net200710"},
-{"200724", "Net200724"},
-{"200807", "Net200807"},
-{"200821", "Net200821"},
-{"200904", "Net200904"},
-{"200917", "Net200917"},
-{"201001", "Net201001"},
-{"201016", "Net201016"},
-{"201030", "Net201030"},
-{"201113", "Net201113"},
-{"201127", "Net201127"},
-{"201211", "Net201211"},
-{"201225", "Net201225"},
-{"210108", "Net210108"},
-{"210121", "Net210121"},
-{"210205", "Net210205"},
-{"210219", "Net210219"},
-{"210305", "Net210305"},
-{"210318", "Net210318"},
-{"210401", "Net210401"},
-{"210409", "Net210409"},
-{"210416", "Net210416"},
-{"210428", "Net210428"},
-{"210514", "Net210514"},
-{"210528", "Net210528"},
-{"210611", "Net210611"},
-{"210625", "Net210625"},
-{"210709", "Net210709"},
-{"210723", "Net210723"},
-{"210805", "Net210805"},
-{"210820", "Net210820"},
-{"210903", "Net210903"},
-{"210916", "Net210916"},
-{"210922", "Net210922"},
-{"211001", "Net211001"},
-{"211015", "Net211015"},
-{"211029", "Net211029"},
-{"211112", "Net211112"},
-{"211126", "Net211126"},
-{"211210", "Net211210"},
-{"211216", "Net211216"},
-{"211224", "Net211224"},
-{"220107", "Net220107"},
-{"220114", "Net220114"},
-{"220128", "Net220128"},
-{"220210", "Net220210"},
-{"220225", "Net220225"},
-{"220303", "Net220303"},
-{"220311", "Net220311"},
-{"220324", "Net220324"},
-{"220401", "Net220401"},
-{"220408", "Net220408"},
-{"220415", "Net220415"},
-{"220428", "Net220428"},
-};
- public static Dictionary releaseTagNameDic = new Dictionary{
-{"1", "Ver1.00.00"},
-{"501", "Ver1.05.00"},
-{"1001", "Ver1.10.00"},
-{"1501", "Ver1.15.00"},
-{"2001", "Ver1.20.00"},
-{"2501", "Ver1.25.00"},
-};
- public static Dictionary rightsInfoDic = new Dictionary{
-{"0", ""},
-{"1", "? 2016 暁なつめ?三嶋くろね/KADOKAWA/このすば製作委員会"},
-{"2", "? 2017 つくしあきひと?竹書房/メイドインアビス製作委員会"},
-{"3", "? Crypton Future Media, INC. www.piapro.net (+piapro logo)"},
-{"4", "? Crypton Future Media, INC. www.piapro.net (+piapro logo) ?MTK/INTERNET Co., Ltd."},
-{"5", "? Crypton Future Media, INC. www.piapro.net (+piapro logo) GUMI(Megpoid)?INTERNET Co., LTD."},
-{"6", "? Crypton Future Media, INC. www.piapro.net (+piapro logo) デザイン協力:ねんどろいど"},
-{"7", "? Cygames, Inc."},
-{"8", "? Green Leaves / Wake Up, Girls!製作委員会"},
-{"9", "?Koi?芳文社/ご注文は製作委員会ですか?"},
-{"10", "? TAITO CORP.1996"},
-{"11", "? TAITO CORP.1996 ?SEGA"},
-{"12", "? カルロ?ゼン?KADOKAWA刊/幼女戦記製作委員会"},
-{"13", "? 長月達平?株式会社KADOKAWA刊/Re:ゼロから始める異世界生活製作委員会"},
-{"14", "?1st PLACE Co., Ltd. / IA PROJECT"},
-{"15", "?2013 RK,KM/UMDP"},
-{"16", "?2013ちょぼらうにょぽみ/竹書房 倉持南高校漫画研究部(竹書房?SPO?AT-X)"},
-{"18", "?2014 Konami Digital Entertainment"},
-{"20", "?2014 榎宮祐?株式会社KADOKAWA メディアファクトリー刊/ノーゲーム?ノーライフ全権代理委員会"},
-{"21", "?2015 サンカクヘッド/集英社?「干物妹!うまるちゃん」製作委員会"},
-{"23", "?2016 うかみ/KADOKAWA アスキー?メディアワークス/ガヴリールドロップアウト製作委員会"},
-{"25", "?2017 VOCALOMAKETS Powered by Bumpy Factory Corporation. 結月ゆかりは株式会社バンピーファクトリーの登録商標です 。"},
-{"26", "?2017 サンカクヘッド/集英社?「干物妹!うまるちゃんR」製作委員会"},
-{"27", "?2018 VOCALOMAKETS Powered by Bumpy Factory Corporation. ?Copyright 2014 AI,Inc. All Rights Reserved. ?AHS Co. Ltd."},
-{"28", "?2018 VOCALOMAKETS Powered by Bumpy Factory Corporation. 結月ゆかりは株式会社バンピーファクトリーの登録商標です。"},
-{"29", "?Ark Performance/少年画報社?アルペジオパートナーズ"},
-{"31", "?BANDAI NAMCO Entertainment Inc."},
-{"32", "?BANDAI NAMCO Games Inc."},
-{"33", "?BANDAI NAMCO Games Inc. ? TAITO CORP.1996"},
-{"34", "?BANDAI NAMCO Games Inc. ?SEGA"},
-{"35", "?HARUKAZE"},
-{"36", "?Junky"},
-{"37", "?MTK/INTERNET Co., Ltd."},
-{"38", "?NHN PlayArt Corp. ?DWANGO Co., Ltd."},
-{"39", "?Sammy"},
-{"40", "?SEGA"},
-{"41", "?SEGA / f4samurai"},
-{"42", "?SEGA/?RED"},
-{"43", "?SEGA/GO!GO!575製作委員会"},
-{"45", "?SEGA?RED Illustration:Kosuke Fujishima"},
-{"46", "?SEGA?RED?白泉社"},
-{"47", "?TAITO CORP.1978,2014"},
-{"48", "?TOHOKU PENET K.K."},
-{"49", "?あfろ?芳文社/野外活動サークル"},
-{"50", "?けものフレンズプロジェクト"},
-{"53", "?にじよめ"},
-{"54", "?ヒロユキ?講談社/アホガール製作委員会"},
-{"55", "?鎌池和馬/冬川基/アスキー?メディアワークス/PROJECT-RAILGUN S"},
-{"57", "?三月?KADOKAWA刊/ひなこのーと製作委員会"},
-{"58", "?上海アリス幻樂団"},
-{"59", "?上海アリス幻樂団 「おてんば恋娘」"},
-{"60", "?上海アリス幻樂団 「竹取飛翔 ~ Lunatic Princess」"},
-{"61", "?大川ぶくぶ/竹書房?キングレコード"},
-{"63", "designed by HaltquinZ????(ましろま+Rinne.6)"},
-{"64", "GUMI(Megpoid)?INTERNET Co., LTD."},
-{"65", "ill.by 穂嶋 ? Crypton Future Media, INC. www.piapro.net (+piapro logo)"},
-{"66", "illustration by AO FUJIMORI / 雪ミク2017 ? Crypton Future Media, INC. www.piapro.net (+piapro logo)"},
-{"67", "illustろこる(@tuno901)"},
-{"68", "Licensed by BANDAI NAMCO Arts Inc./Lantis Records. ?毛魂一直線?ふゅーじょんぷろだくと/魔法少女俺製作委員会"},
-{"69", "Licensed by REISSUE RECORDS inc. ? Crypton Future Media, INC. www.piapro.net (+piapro logo)"},
-{"70", "Licensed by TOY'S FACTORY INC."},
-{"71", "?2015 SPACE SHOWER NETWORKS INC. ?2015 SPACE SHOWER NETWORKS INC."},
-{"72", "TVアニメ『Hi☆sCoool! セハガール』?SEGA/セハガガ学園理事会"},
-{"73", "セガ?ハード?ガールズ ?SEGA TVアニメ『Hi☆sCoool! セハガール』?SEGA/セハガガ学園理事会"},
-{"74", "プランチャイム"},
-{"75", "蒲焼鰻 ?上海アリス幻樂団"},
-{"76", "重音テト? 線/小山乃舞世/ツインドリル"},
-{"77", "?けものフレンズプロジェクト2A"},
-{"78", "U.S.A. Music by Claudio Accatino, Donatella Cirelli & Anna Maria Gioco Words by Donatella Cirelli & Severino Lombardoni ? by THE SAIFAM GROUP SRL ? by EDIZIONI ZYX MUSIC S.R.L. All rights reserved. Used by permission. Rights for Japan administered by NICHION, INC. Licensed by Avex Music Publishing Inc."},
-{"79", "? UUUM"},
-{"80", "?円谷プロ ?2018 TRIGGER?雨宮哲/「GRIDMAN」製作委員会"},
-{"81", "?KADOKAWA CORPORATION ?F.M.F Co,.Ltd."},
-{"82", "?板垣恵介(秋田書店)/バキ製作委員会"},
-{"83", "? コチンPa!製作委員会"},
-{"84", "?ゾンビランドサガ製作委員会"},
-{"85", "?円谷プロ ?怪獣娘2(ウルトラ怪獣擬人化計画)製作委員会"},
-{"86", "?2019 VOCALOMAKETS Powered by Bumpy Factory Corporation. 結月ゆかりは株式会社バンピーファクトリーの登録商標です 。"},
-{"87", "?2019 VOCALOMAKETS Powered by Bumpy Factory Corporation. 紲星あかりは株式会社バンピーファクトリーの登録商標です 。"},
-{"88", "?円谷プロ ?怪獣娘黒(ウルトラ怪獣擬人化計画)製作委員会"},
-{"89", "? 大川ぶくぶ/竹書房?キングレコード ?AC部"},
-{"90", "? Crypton Future Media, INC. www.piapro.net (+piapro logo) 2012 by FUJIPACIFIC MUSIC INC. & DWANGO Co., Ltd."},
-{"91", "?2015 by HIP LAND MUSIC CORPORATION INC. Licensed by Victor Entertainment"},
-{"92", "Licensed by BANDAI NAMCO ARTS Inc./Lantis Records ?クール教信者?双葉社/ドラゴン生活向上委員会"},
-{"93", "?赤坂アカ/集英社?かぐや様は告らせたい製作委員会"},
-{"94", "?異世界かるてっと/KADOKAWA"},
-{"96", "?CHIROLU?ホビージャパン/白金の妖精姫を見守る会"},
-{"97", "?TADAKOI PARTNERS ?KADOKAWA CORPORATION"},
-{"98", "? Crypton Future Media, INC. www.piapro.net (+piapro logo) ?NHN PlayArt Corp. ?DWANGO Co., Ltd."},
-{"99", "?六厘舎"},
-{"100", "?Rayark Inc."},
-{"101", "? UMAMI CHAN ? やおきん"},
-{"102", "?VAP"},
-{"103", "?Koi?芳文社/ご注文は製作委員会ですか??"},
-{"104", "?伊藤いづも?芳文社/まちカドまぞく製作委員会"},
-{"105", "Licensed by Sony Music Labels Inc."},
-{"106", "?小林 立/スクウェアエニックス?咲阿知賀編製作委員会 ? BANDAI NAMCO Arts Inc./Lantis Records"},
-{"107", "?2019 サンドロビッチ?ヤバ子,MAAM?小学館/シルバーマンジム"},
-{"108", "?2017-2020 Ichikara Inc."},
-{"109", "?OFFICIALHIGEDANDISM"},
-{"110", "?Copyright 2014 AI,Inc. All Rights Reserved."},
-{"111", "? lowiro 2021"},
-{"112", "Emoji Powered by Twemoji, used under CC BY 4.0 / Includes alternation from original"},
-{"113", "?OTOIRO Inc."},
-{"114", "? 2017-2020 cover corp."},
-{"115", "?Gynoid. Illustration by のう"},
-{"116", "? SEGA ? Colorful Palette Inc. ? Crypton Future Media, INC. www.piapro.net (+piapro logo) All rights reserved."},
-{"117", "? いらすとや"},
-{"118", "Licensed by EMI Records, A UNIVERSAL MUSIC COMPANY"},
-{"119", "Licensed by UNIVERSAL CLASSICS & JAZZ, A UNIVERSAL MUSIC COMPANY ?2019日本すみっコぐらし協会映画部"},
-{"120", "?2006 谷川 流?いとうのいぢ/SOS団"},
-{"122", "?山口悟?一迅社/はめふら製作委員会 Licensed by KING RECORD Co., Ltd."},
-{"123", "ビッカメ娘?ナイセン"},
-{"124", "?Avogado6"},
-{"125", "?Copyright 2021 SSS LLC. ?2021 VOCALOMAKETS Powered by Bumpy Factory Corporation."},
-{"126", "?上海アリス幻樂団 ?GSC/NN"},
-{"127", "Licensed by Virgin Music, A UNIVERSAL MUSIC COMPANY"},
-{"128", "?cosMo@Bousou-P/CHEMICAL SYSTEM"},
-{"129", "?キノシタ ? Crypton Future Media, INC. www.piapro.net (+piapro logo) ?MTK/INTERNET Co., Ltd."},
-{"130", "?あfろ?芳文社/野外活動委員会"},
-{"131", "?2020 丈/KADOKAWA/宇崎ちゃん製作委員会"},
-{"132", "Licensed by Sony Music Entertainment (Japan) Inc. Sony Music Entertainment (Japan) Inc. / 藍にいな"},
-{"133", "?キノシタ ?MTK/INTERNET Co., Ltd."},
-{"134", "?上海アリス幻樂団 ?アンノウンX / AQUASTYLE?DeNA?xeen inspiredby 東方Project"},
-{"135", "?ANYCOLOR, Inc."},
-{"136", "? Bit192"},
-{"137", "?2018 F.M.F"},
-{"138", "Licensed by unBORDE / Warner Music Japan Inc. / A-Sketch inc. ??Avogado6"},
-{"139", "?クール教信者?双葉社/ドラゴン生活向上委員会"},
-{"140", "?BANDAI NAMCO Arts Inc. ? Cygames, Inc."},
-{"141", "?bushiroad All Rights Reserved. ? 2020 DONUTS Co. Ltd. All Rights Reserved."},
-{"144", "? Crypton Future Media, INC. www.piapro.net (+piapro logo) ?OTOIRO Inc."},
-};
- public static Dictionary artistNameDic = new Dictionary{
-{"0", ""},
-{"1", "「BAYONETTA(ベヨネッタ)」"},
-{"2", "「BORDER BREAK UNION」メインテーマ"},
-{"3", "「BORDER BREAK」"},
-{"4", "「PHANTASY STAR PORTABLE」"},
-{"5", "「PHANTASY STAR PORTABLE2 ∞」"},
-{"6", "「PHANTASY STAR PORTABLE2」"},
-{"7", "「サクラ大戦」"},
-{"8", "「サクラ大戦奏組」"},
-{"9", "「バーチャファイター」"},
-{"10", "「新豪血寺一族 -煩悩解放-」"},
-{"11", "「龍が如く 見参!」"},
-{"12", "「龍が如く2」"},
-{"13", "★STAR GUiTAR [cover]"},
-{"14", "10Re;「学園ハンサム」"},
-{"15", "164"},
-{"16", "40mP"},
-{"18", "A4paper"},
-{"19", "AcuticNotes"},
-{"20", "After the Rain(そらる×まふまふ)"},
-{"21", "ALiCE'S EMOTiON feat. Ayumi Nomiya"},
-{"22", "Aliesrite* (Ym1024 feat. lamie*)"},
-{"23", "angela「アホガール」"},
-{"24", "A-One"},
-{"25", "ARM(IOSYS)"},
-{"26", "ARM+夕野ヨシミ (IOSYS) feat.miko"},
-{"27", "ARM+夕野ヨシミ(IOSYS)"},
-{"28", "ARM+夕野ヨシミ(IOSYS)feat. miko"},
-{"29", "ARM+夕野ヨシミ(IOSYS)feat. 藤咲かりん"},
-{"30", "ARM+夕野ヨシミ(IOSYS)feat. 藤枝あかね"},
-{"31", "ARM+夕野ヨシミ(IOSYS)feat.山本椛"},
-{"32", "BNSI(Taku Inoue)「シンクロニカ」より"},
-{"33", "capsule [cover]"},
-{"34", "Caramell/Caramelldansen [cover]"},
-{"35", "Cash Cash「ソニック ジェネレーションズ」"},
-{"36", "Circle of friends(天月-あまつき-?un:c?伊東歌詞太郎?コニー?はしやん)"},
-{"37", "CIRCRUSH"},
-{"38", "ClariS 「魔法少女まどか☆マギカ」"},
-{"39", "Clean Tears"},
-{"40", "Clean Tears feat. Youna"},
-{"41", "COSIO(ZUNTATA)「グルーヴコースター」より"},
-{"42", "COSIO(ZUNTATA/TAITO)/沢城千春「電車でGO!」"},
-{"43", "COSIO(ZUNTATA/TAITO)「カルテット」"},
-{"44", "COSIO(ZUNTATA/TAITO)「ファンタジーゾーン」「RIDGE RACER」"},
-{"45", "cosMo@暴走P"},
-{"46", "Cranky"},
-{"47", "Cranky feat. まらしぃ & てっぺい先生"},
-{"48", "Crush 40「ソニックアドベンチャー2」"},
-{"49", "cubesato"},
-{"50", "cybermiso"},
-{"51", "D.watt(IOSYS)+らっぷびと"},
-{"52", "D.watt(IOSYS)feat. Asana"},
-{"53", "D.watt(IOSYS)feat.ちよこ"},
-{"54", "daniwell"},
-{"55", "dawn-system"},
-{"56", "D-Cee"},
-{"57", "DECO*27"},
-{"58", "DECO*27 feat.echo"},
-{"59", "DECO*27 feat.Tia"},
-{"60", "DiGiTAL WiNG"},
-{"61", "Dixie Flatline"},
-{"62", "DJ YOSHITAKA「jubeat」より"},
-{"63", "doriko"},
-{"65", "E.G.G.「グルーヴコースター」より"},
-{"66", "EasyPop"},
-{"67", "EB(aka EarBreaker)"},
-{"68", "EBIMAYO"},
-{"69", "ELEMENTAS feat. NAGISA"},
-{"70", "emon"},
-{"71", "Eve"},
-{"72", "EZFG"},
-{"73", "Feryquitous"},
-{"76", "Frums"},
-{"77", "good-cool ft. Pete Klassen"},
-{"78", "GOSH/manami"},
-{"79", "GOSH/クラシック「悲愴」"},
-{"80", "GYARI"},
-{"81", "HALFBY"},
-{"82", "Halozy"},
-{"83", "hanzo/赤飯歌唱Ver"},
-{"84", "Hi☆sCoool! セハガール"},
-{"85", "Hiro"},
-{"86", "Hiro feat.越田Rute隆人&ビートまりお"},
-{"87", "Hiro(SEGA)「RIDGE RACER」「電車でGO!」"},
-{"88", "Hiro(SEGA)「ファンタジーゾーン」"},
-{"89", "Hiro/タクマロ"},
-{"90", "Hiro/永江理奈"},
-{"91", "Hiro/小山あかり"},
-{"92", "Hiro/森山愛子"},
-{"93", "Hiro/友香"},
-{"94", "Hiro「Crackin’DJ」"},
-{"95", "Hiro「maimai」より"},
-{"96", "HiTECH NINJA"},
-{"97", "HoneyWorks"},
-{"98", "ika"},
-{"99", "Innocent Keyと小宮真央、ココ、樹詩音"},
-{"100", "Innocent Keyと梨本悠里、JUNCA、小宮真央、樹詩音、大瀬良あい"},
-{"101", "INNOCENT NOIZE"},
-{"102", "Ino(chronoize)"},
-{"103", "IOSYSと愉快な⑨周年フレンズ"},
-{"104", "iroha(sasaki)/kuma(alfred)"},
-{"105", "IRON ATTACK!"},
-{"106", "Jimmy Weckl"},
-{"107", "Jimmy Weckl feat.高貴みな"},
-{"108", "Jitterin' Jinn [covered by ろん]"},
-{"109", "Jun Senoue"},
-{"110", "Junky"},
-{"111", "Kai/クラシック「G線上のアリア」"},
-{"112", "Kai/光吉猛修"},
-{"113", "Kai/能登有沙"},
-{"114", "Kai「Wonderland Wars」"},
-{"115", "kamome sano"},
-{"116", "kanone feat. せんざい"},
-{"117", "Keitarou Hanada「戦国大戦」"},
-{"118", "kemu"},
-{"119", "KeN/エンドケイプ"},
-{"120", "KENTARO「Crackin’DJ」"},
-{"121", "koutaq"},
-{"122", "Last Note."},
-{"123", "LeaF"},
-{"124", "LindaAI-CUE(BNGI)「太鼓の達人」より"},
-{"126", "livetune"},
-{"127", "loos feat. Meramipop"},
-{"128", "loos feat. 柊莉杏"},
-{"129", "LOPIT(SEGA)"},
-{"130", "M.S.S Project"},
-{"131", "M2U"},
-{"132", "Machico「この素晴らしい世界に祝福を!」"},
-{"133", "MARETU"},
-{"134", "MARUDARUMA"},
-{"135", "Masayoshi Minoshima"},
-{"136", "Masayoshi Minoshima feat. 綾倉盟"},
-{"137", "mathru(かにみそP)"},
-{"138", "MECHANiCAL PANDA「BORDER BREAK」"},
-{"139", "m-flo [cover]"},
-{"140", "MintJam feat.光吉猛修"},
-{"141", "Mitchie M"},
-{"142", "MY FIRST STORY"},
-{"143", "MYTH & ROID「Re:ゼロから始める異世界生活」"},
-{"144", "myu314 feat.あまね(COOL&CREATE)"},
-{"145", "n.k"},
-{"146", "Nankumo/CUBE3"},
-{"147", "naotyu- feat. 佐々木恵梨"},
-{"148", "n-buna"},
-{"149", "n-buna × Orangestar"},
-{"150", "n-buna feat.ヤギヌマカナ"},
-{"151", "Neru"},
-{"152", "niki"},
-{"153", "NIKO [cover]"},
-{"154", "Nizikawa"},
-{"155", "nora2r"},
-{"156", "ONE (song by ナナホシ管弦楽団)"},
-{"157", "ONIGAWARA"},
-{"159", "Orangestar"},
-{"160", "OSTER project"},
-{"161", "Otomania feat. 初音ミク"},
-{"162", "out of service"},
-{"163", "owl*tree"},
-{"164", "Palme"},
-{"165", "paraoka"},
-{"166", "Performed by SEGA Sound Unit [H.]"},
-{"167", "Performed by 光吉猛修"},
-{"168", "Petit Rabbit's「ご注文はうさぎですか?」"},
-{"169", "Project Grimoire"},
-{"170", "Q;indivi [cover]"},
-{"171", "Queen P.A.L."},
-{"174", "RADWIMPS"},
-{"175", "RAMM feat. 若井友希"},
-{"176", "Ras"},
-{"177", "REDALiCE"},
-{"178", "REDALiCE (HARDCORE TANO*C)"},
-{"180", "RYOHEI KOHNO/森綾香"},
-{"181", "RYOHEI KOHNO/保立美和子"},
-{"182", "S!N?高橋菜々×ひとしずく?やま△"},
-{"183", "samfree"},
-{"184", "samfree feat.(V)???(V)かにぱん。(A-ONE)"},
-{"185", "Sampling Masters MEGA"},
-{"186", "sampling masters MEGA「パワードリフト」"},
-{"187", "sasakure.UK"},
-{"188", "sasakure.UK x DECO*27"},
-{"189", "SC-3000(シーさん)/CV.相沢 舞、SG-1000(せん)/CV.芹澤 優、SG-1000Ⅱ(せんつー)/CV.大空直美、ゲームギア(ムギ)/CV.田 中美海、ロボピッチャ(ぴっちゃん)/CV.もものはるな「Hi☆sCoool! セハガール」 [アニメPV]"},
-{"191", "SEGA Sound Unit [H.]"},
-{"193", "Shandy kubota"},
-{"194", "SHIKI"},
-{"195", "Shoichiro Hirata"},
-{"196", "Shoichiro Hirata feat.SUIMI"},
-{"197", "SIAM SHADE [covered by 湯毛]"},
-{"198", "Silver Forest"},
-{"199", "siromaru + cranky"},
-{"200", "sky_delta"},
-{"201", "SLAVE.V-V-R"},
-{"202", "Sou×マチゲリータ"},
-{"203", "SOUND HOLIC feat. Nana Takahashi"},
-{"204", "SOUND HOLIC feat. 匠眞"},
-{"205", "Sta"},
-{"206", "Sta feat.b"},
-{"207", "Sta feat.tigerlily and DOT96"},
-{"208", "Storyteller"},
-{"209", "Street"},
-{"210", "sumijun(Halozy) feat. ななひら(Confetto)"},
-{"211", "supercell「化物語」"},
-{"212", "SYNC.ART'S feat. 美里"},
-{"213", "t+pazolite"},
-{"214", "Taishi"},
-{"215", "Takahiro Eguchi feat. 三澤秋"},
-{"216", "Tanchiky"},
-{"217", "Tatsh"},
-{"218", "Team-D"},
-{"219", "tilt-six feat.串伊トモミ"},
-{"220", "Trefle「チェインクロニクル」"},
-{"221", "Tsukasa(Arte Refact)"},
-{"222", "un:c?ろん×じーざすP"},
-{"223", "UNISON SQUARE GARDEN"},
-{"224", "uno(IOSYS) feat.miko"},
-{"225", "void (Mournfinale)"},
-{"226", "void(Mournfinale)"},
-{"227", "void+夕野ヨシミ (IOSYS) feat.藤原鞠菜"},
-{"228", "vox2(小野秀幸)"},
-{"229", "WAiKURO"},
-{"230", "Wake Up, Girls!"},
-{"231", "wowaka"},
-{"232", "xi"},
-{"233", "YASUHIRO(康寛)"},
-{"234", "YMCK"},
-{"235", "Yosh(Survive Said The Prophet)"},
-{"236", "Yuji Masubuchi(BNGI)「RIDGE RACER」"},
-{"237", "Yuji Masubuchi(BNGI)「電車でGO!」「ファンタジーゾーン」"},
-{"238", "Yuji Masubuchi「太鼓の達人」より"},
-{"239", "zts"},
-{"240", "あ~るの~と(いえろ~ぜぶら)"},
-{"242", "アゴアニキ"},
-{"243", "あべにゅうぷろじぇくと feat.佐倉紗織&井上みゆ「パチスロ快盗天使ツインエンジェル」"},
-{"244", "あまね+ビートまりお(COOL&CREATE)"},
-{"245", "アミティ(CV 菊池志穂)「ぷよぷよ」"},
-{"247", "アルル(CV 園崎未恵)「ぷよぷよ」"},
-{"248", "イロドリミドリ「CHUNITHM」"},
-{"249", "うたたP"},
-{"250", "うたよめ575<正岡小豆(大坪由佳)小林抹茶(大橋彩香)>"},
-{"251", "うどんゲルゲ"},
-{"252", "オワタP"},
-{"253", "かいりきベア"},
-{"254", "ガヴリール(富田美憂),ヴィーネ(大西沙織),サターニャ(大空直美),ラフィエル(花澤香菜)「ガヴリールドロッ プアウト」"},
-{"255", "カタオカツグミ"},
-{"256", "かねこちはる"},
-{"257", "カラスは真っ白"},
-{"258", "カラフル?サウンズ?ポート"},
-{"259", "ガリガリさむし"},
-{"260", "カルロス袴田(サイゼP)"},
-{"261", "ギガ/れをる"},
-{"262", "ギガ/れをる ダンス アルスマグナ"},
-{"264", "キノシタ feat. 音街ウナ"},
-{"266", "クーナ(CV 喜多村英梨)「PHANTASY STAR ONLINE 2」"},
-{"267", "くちばしP"},
-{"268", "ゴジマジP"},
-{"269", "ササキトモコ「音声感情測定器ココロスキャン」"},
-{"270", "ササノマリイ"},
-{"271", "さつき が てんこもり"},
-{"272", "さつき が てんこもり feat. YURiCa/花たん"},
-{"273", "じまんぐ"},
-{"274", "じん"},
-{"275", "スーパーラバーズ「きみのためなら死ねる」"},
-{"276", "スーパーラバーズ「赤ちゃんはどこからくるの?」"},
-{"277", "すこっぷ"},
-{"278", "スズム"},
-{"280", "セブンスヘブンMAXION"},
-{"281", "そらる?ろん×れるりり"},
-{"282", "ターニャ?デグレチャフ(CV.悠木碧)「幼女戦記」"},
-{"283", "ちょむP "},
-{"284", "てにをは"},
-{"286", "どうぶつビスケッツ×PPP「けものフレンズ」"},
-{"287", "とくP"},
-{"288", "どぶウサギ"},
-{"289", "トラボルタ"},
-{"290", "ナイセン - momoco-"},
-{"291", "ナノ feat.MY FIRST STORY"},
-{"292", "ナノウ"},
-{"293", "ナユタン星人"},
-{"294", "にしもと先生、タクマ、どんちゃん「ちょっと盛りました。」"},
-{"295", "にじよめちゃんとZIPたん"},
-{"296", "ぬゆり"},
-{"297", "ぬるはち"},
-{"298", "ねこみりん + nora2r feat. 小宮真央"},
-{"299", "ねじ式"},
-{"300", "のぼる↑"},
-{"301", "ノマ"},
-{"302", "ハチ"},
-{"304", "はっぱ隊 [cover]"},
-{"305", "ぱなまん/カラスヤサボウ"},
-{"306", "バルーン"},
-{"307", "ビートまりお"},
-{"308", "ビートまりお + ARM feat. 高橋名人"},
-{"309", "ビートまりお(COOL&CREATE)"},
-{"310", "ビートまりお(COOL&CREATE)"},
-{"311", "ビートまりお(COOL&CREATE)+ ARM(IOSYS)"},
-{"312", "ビートまりお母(尾崎順子)"},
-{"313", "ヒゲドライバー"},
-{"314", "ひとしずくP?やま△"},
-{"315", "ピノキオP"},
-{"316", "ピノキオピー"},
-{"317", "ぽてんしゃる0"},
-{"318", "ポリスピカデリー"},
-{"319", "まふまふ"},
-{"320", "みきとP"},
-{"321", "モリモリあつし"},
-{"322", "ヤスオ"},
-{"323", "ゆうゆ"},
-{"324", "ゆりん?柿チョコ×Neru"},
-{"325", "ルゼ"},
-{"326", "れるりり"},
-{"327", "れるりり feat.ろん"},
-{"328", "ろん×Junky"},
-{"329", "ろん×黒魔"},
-{"330", "ろん×田中秀和(MONACA)"},
-{"331", "ワンダフル☆オポチュニティ!"},
-{"332", "亜沙"},
-{"333", "愛(C.V.大坪由佳) 麻衣(C.V.内田彩) ミイ(C.V.内田真礼)「あいまいみー」"},
-{"334", "伊東歌詞太郎"},
-{"335", "伊東歌詞太郎?ろん×まらしぃ"},
-{"336", "伊東歌詞太郎?ろん×れるりり"},
-{"337", "陰陽座"},
-{"338", "下田麻美「Shining?Force CROSS ELYSION」"},
-{"339", "加賀美 祥「学園ハンサム」"},
-{"340", "歌組雪月花 夜々(原田ひとみ)/いろり(茅野愛衣)/小紫(小倉唯)「機巧少女は傷つかない」"},
-{"341", "柿チョコ×みきとP"},
-{"342", "角田信朗「ヒーローバンク」"},
-{"344", "岸田教団&THE明星ロケッツ"},
-{"345", "暁Records"},
-{"346", "桐生 一馬「龍が如く」"},
-{"347", "劇団ひととせ「ひなこのーと」"},
-{"348", "月鈴 那知(CV:今村 彩夏)"},
-{"349", "月鈴 白奈(CV:高野 麻里佳)"},
-{"350", "月鈴姉妹(イロドリミドリ)"},
-{"351", "古代 祐三「ファンタジーゾーン」"},
-{"352", "御形 アリシアナ(CV:福原 綾香)"},
-{"353", "光吉猛修"},
-{"354", "光吉猛修&体操隊"},
-{"355", "光吉猛修「デイトナ Championship USA」"},
-{"356", "光吉猛修「バーチャロン」"},
-{"357", "光吉猛修「ホルカ?トルカ」"},
-{"358", "向日葵×emon(Tes.)"},
-{"359", "高橋菜々×岡部啓一(MONACA)"},
-{"360", "黒うさP"},
-{"361", "骨盤P"},
-{"362", "今日犬"},
-{"363", "魂音泉"},
-{"364", "佐野 信義「スペースハリアー」"},
-{"365", "彩音"},
-{"366", "削除"},
-{"367", "三草康二郎「CODE OF JOKER」"},
-{"368", "山根ミチル"},
-{"373", "小仏 凪(CV:佐倉 薫)"},
-{"374", "小野隊長とJimmy親分"},
-{"376", "上坂すみれ「ポプテピピック」"},
-{"377", "新小田夢童 & キラ★ロッソ"},
-{"378", "新庄かなえ(CV:三森すずこ)「てーきゅう」"},
-{"379", "仁井山征弘 Feat. GREAT G and surprise"},
-{"380", "青木 千紘「龍が如く 維新!」"},
-{"381", "青木千紘/愛海"},
-{"382", "石鹸屋"},
-{"383", "霜月はるか"},
-{"384", "打首獄門同好会"},
-{"385", "大久保 博(BNGI)「デイトナ USA」"},
-{"386", "大谷智哉, Douglas Robb from Hoobastank「ソニック フォース」"},
-{"387", "大谷智哉, Jean Paul Makhlouf of Cash Cash「ソニック カラーズ」"},
-{"388", "大谷智哉「ソニック ジェネレーションズ」"},
-{"389", "大谷智哉「ソニック ロストワールド」"},
-{"390", "大谷智哉「リズム怪盗R 皇帝ナポレオンの遺産」"},
-{"391", "谷屋楽"},
-{"392", "樽木栄一郎"},
-{"393", "長沼英樹「ソニック ラッシュ」"},
-{"394", "椎名もた (ぽわぽわP)"},
-{"395", "天王洲 なずな(CV:山本 彩乃)"},
-{"397", "田中マイミ"},
-{"398", "土間うまる [CV.田中あいみ]「干物妹!うまるちゃん」"},
-{"399", "土間うまる(田中あいみ)「干物妹!うまるちゃんR」"},
-{"400", "怒髪天「百鬼大戦絵巻」"},
-{"401", "東京アクティブNEETs"},
-{"402", "東京スカパラダイスオーケストラ [cover]"},
-{"403", "豚乙女"},
-{"404", "日向電工"},
-{"405", "猫叉Master「jubeat」より"},
-{"406", "箱部 なる(CV:M?A?O)"},
-{"407", "幡谷尚史 Arranged by SEGA Sound Unit [H.]「バーニングレンジャー」"},
-{"408", "幡谷尚史「リズム怪盗R 皇帝ナポレオンの遺産」"},
-{"409", "八王子P"},
-{"410", "発熱巫女~ず"},
-{"411", "舞風-MAIKAZE/沙紗飛鳥"},
-{"412", "舞風-MAIKAZE/時音-TOKINE"},
-{"413", "福山光晴"},
-{"414", "福山光晴「Crackin’DJ」"},
-{"415", "平井堅 [cover]"},
-{"416", "米津玄師"},
-{"417", "芳川よしの"},
-{"418", "妹S「干物妹!うまるちゃんR」"},
-{"420", "明坂 芹菜(CV:新田 恵海)"},
-{"423", "矢鴇つかさ feat. kalon."},
-{"424", "矢鴇つかさ feat. 三澤秋"},
-{"425", "幽閉サテライト"},
-{"426", "鈴木このみ「ノーゲーム?ノーライフ」"},
-{"428", "和田たけあき(くらげP)"},
-{"429", "鬱P feat.flower"},
-{"430", "澤村 遥「龍が如く5 夢、叶えし者」"},
-{"431", "LOPIT"},
-{"432", "あべにゅうぷろじぇくと feat.天月めぐる&如月すみれ「ツインエンジェルBREAK」"},
-{"433", "MOSAIC.WAV"},
-{"434", "ave;new feat.佐倉紗織"},
-{"435", "亜咲花"},
-{"436", "大橋彩香"},
-{"437", "パトリシア?オブ?エンド?黒木未知?夕莉シャチ?明日原ユウキ「ノラと皇女と野良猫ハート」"},
-{"438", "fripSide"},
-{"439", "そらまふうらさか"},
-{"440", "cosMo VS dj TAKA「SOUND VOLTEX」より"},
-{"441", "MASAKI(ZUNTATA)「グルーヴコースター3EXドリームパーティー」より"},
-{"442", "Drop&祇羽 feat. 葉月ゆら「太鼓の達人」より"},
-{"443", "デッドボールP"},
-{"444", "SOUND HOLIC feat. 3L"},
-{"445", "Tsukasa"},
-{"446", "HIRO/曲者P"},
-{"447", "OSTERproject"},
-{"448", "baker"},
-{"449", "のりP"},
-{"450", "BlackY fused with WAiKURO"},
-{"451", "Sprite Recordings"},
-{"452", "ビートまりお+あまね(COOL&CREATE)"},
-{"453", "ARM (IOSYS)"},
-{"454", "箱部なる(CV:M?A?O)"},
-{"455", "小仏凪(CV:佐倉薫)"},
-{"456", "月鈴那知(CV:今村彩夏)"},
-{"457", "リコ(CV:富田美憂)、レグ(CV:伊瀬茉莉也)"},
-{"458", "kanone"},
-{"459", "ジータ(CV:金元寿子)、ルリア(CV:東山奈央)、ヴィーラ(CV:今井麻美)、マリー(CV:長谷川明子)"},
-{"460", "ペコリーヌ(CV:M?A?O)、コッコロ(CV:伊藤美来)、キャル(CV:立花理香)"},
-{"461", "池頼広"},
-{"462", "Shoichiro Hirata feat.Sana"},
-{"463", "Demetori"},
-{"464", "ゆうゆ / 篠螺悠那"},
-{"465", "cosMo@暴走P"},
-{"466", "Cres."},
-{"467", "ちーむMOER"},
-{"468", "ねこみりん feat.小宮真央"},
-{"469", "光吉猛修の父"},
-{"471", "Team Grimoire"},
-{"472", "S!N?+α/あるふぁきゅん。×ALI PROJECT"},
-{"473", "島爺×蜂屋ななし"},
-{"474", "やしきん feat.でらっくま(CV:三森すずこ)"},
-{"475", "みきとP feat. FantasticYouth"},
-{"476", "164 feat. めいちゃん"},
-{"477", "曲:kz(livetune)/歌:オンゲキシューターズ"},
-{"480", "MintJam"},
-{"481", "Nothing But Requiem (feat.Aikapin & Chiyoko)"},
-{"482", "USAO"},
-{"483", "舞ヶ原高校軽音部"},
-{"484", "きくお"},
-{"485", "じーざすP feat.kradness"},
-{"486", "青島探偵事務所器楽捜査部B担"},
-{"487", "YUC'e"},
-{"489", "DIVELA feat.初音ミク"},
-{"490", "DA PUMP"},
-{"491", "T.M.Revolution [covered by 光吉猛修]"},
-{"492", "サカナクション"},
-{"493", "OxT"},
-{"494", "どうぶつビスケッツ×PPP「けものフレンズ2」"},
-{"495", "月鈴 那知(ヴァイオリン) 伴奏:イロドリミドリ"},
-{"496", "はるまきごはん feat.初音ミク"},
-{"497", "夏代孝明 feat. 初音ミク"},
-{"498", "colate"},
-{"499", "ポプ子(CV:五十嵐裕美)&ピピ美(CV:松嵜麗)"},
-{"500", "Fear, and Loathing in Las Vegas"},
-{"501", "lumo"},
-{"502", "トーマ"},
-{"503", "otetsu"},
-{"504", "まらしぃ"},
-{"505", "フランシュシュ"},
-{"506", "くっちー (DARKSIDE APPROACH)"},
-{"508", "ヨルシカ"},
-{"509", "あわのあゆむ"},
-{"510", "BLACK STARS(ブラック指令?ペガッサ星人?シルバーブルーメ?ノーバ)"},
-{"511", "アギラ?キングジョー?ガッツ星人(CV:飯田里穂?三森すずこ?松田利冴)"},
-{"512", "立秋 feat.ちょこ"},
-{"513", "Omoi feat. 初音ミク"},
-{"515", "supercell"},
-{"517", "GigaReol"},
-{"520", "ンダホ&ぺけたん from Fischer's"},
-{"521", "アイラ(CV:三森すずこ)シマ(CV:井口裕香)はな(CV:花澤香菜)"},
-{"522", "有機酸"},
-{"523", "SAMBA MASTER 佐藤"},
-{"524", "くらげP"},
-{"525", "曲:宮崎誠/歌:オンゲキシューターズ"},
-{"526", "ユリイ?カノン feat.GUMI"},
-{"527", "なきゃむりゃ"},
-{"528", "削除 feat. Nikki Simmons"},
-{"529", "ビートまりお × Cranky"},
-{"530", "REDALiCE feat. Ayumi Nomiya"},
-{"531", "cosMo@暴走AlterEgo"},
-{"532", "BlackY vs. WAiKURO"},
-{"533", "Yooh"},
-{"534", "Maozon"},
-{"535", "C-Show"},
-{"536", "Masahiro \"Godspeed\" Aoki VS Kai"},
-{"537", "ああああ"},
-{"538", "じーざす(ワンダフル☆オポチュニティ!)feat.Kradness"},
-{"539", "SADA 2Futureanthem feat. ellie"},
-{"540", "中山真斗"},
-{"541", "Rigel Theatre feat. ミーウェル"},
-{"542", "山本真央樹"},
-{"543", "syudou"},
-{"544", "曲:村カワ基成/歌:オンゲキシューターズ"},
-{"545", "曲:鯨井国家/歌:藍原 椿(CV:橋本 ちなみ)"},
-{"546", "曲:ゆよゆっぺ/歌:九條 楓(CV:佳村 はるか)"},
-{"547", "Yunomi feat.nicamoq"},
-{"548", "happy machine"},
-{"549", "大国奏音"},
-{"550", "OSTER project feat. かなたん"},
-{"551", "owl*tree feat.chi*tree"},
-{"552", "ハムちゃんず [covered by 光吉猛修]"},
-{"553", "fhána"},
-{"554", "ろくろ"},
-{"555", "梅とら"},
-{"556", "森羅万象"},
-{"557", "Liz Triangle"},
-{"558", "削除 feat. void (Mournfinale)"},
-{"559", "KAH"},
-{"560", "しーけー"},
-{"561", "鈴木雅之"},
-{"562", "アインズ(日野聡)、カズマ(福島潤)、スバル(小林裕介)、ターニャ(悠木碧)"},
-{"563", "カクとイムラ(CV:松本慶祐)"},
-{"564", "ラティナ(CV:高尾奏音)"},
-{"565", "オーイシマサヨシ"},
-{"566", "田中B"},
-{"567", "すりぃ"},
-{"569", "Syrufit + HDLV"},
-{"570", "Silentroom"},
-{"571", "六厘舎"},
-{"572", "Ice"},
-{"573", "xi vs sakuzyo"},
-{"574", "Rabpit"},
-{"575", "かめりあ(EDP)"},
-{"576", "?sir"},
-{"577", "UMAINA"},
-{"578", "Masayoshi Minoshima × REDALiCE"},
-{"579", "キノシタ feat. 音街ウナ?鏡音リン"},
-{"580", "XYZ"},
-{"581", "ヒゲドライバー feat.らいむっくま(CV:村川梨衣) & れもんっくま(CV:MoeMi)"},
-{"582", "technoplanet"},
-{"583", "hanzo"},
-{"584", "千本松 仁"},
-{"585", "キノシタ feat. そらみこ (ホロライブ ときのそら&さくらみこ)"},
-{"586", "aran"},
-{"587", "雄之助 feat. Sennzai"},
-{"588", "PSYQUI"},
-{"589", "Laur"},
-{"590", "40mP feat. シャノ"},
-{"591", "RD-Sounds feat.中恵光城"},
-{"592", "達見 恵 featured by 佐野 宏晃"},
-{"593", "*Luna feat.NORISTRY"},
-{"594", "お月さま交響曲"},
-{"595", "アリスシャッハと魔法の楽団"},
-{"596", "llliiillliiilll"},
-{"597", "ユリイ?カノン feat.ウォルピスカーター&まひる"},
-{"598", "ELECTROCUTICA"},
-{"599", "曲:中山真斗/歌:マーチングポケッツ [日向 千夏(CV:岡咲 美保)、柏木 美亜(CV:和氣 あず未)、東雲 つむぎ(CV:和 泉 風花)]"},
-{"600", "曲:やしきん/歌:柏木 美亜(CV:和氣 あず未)"},
-{"601", "ぺのれり"},
-{"602", "Cranky feat.おもしろ三国志"},
-{"603", "かいりきベア feat.松下"},
-{"604", "Petit Rabbit's"},
-{"605", "shami momo(吉田優子?千代田桃)/CV:小原好美?鬼頭明里"},
-{"606", "LiSA"},
-{"608", "StylipS"},
-{"609", "紗倉ひびき(CV:ファイルーズあい)&街雄鳴造(CV:石川界人)"},
-{"610", "にじさんじ"},
-{"611", "カンザキイオリ"},
-{"612", "作曲:カジャ 作詞:傘村トータ 編曲:ねじ式 調声:シリア"},
-{"613", "獅子志司"},
-{"614", "ピコン"},
-{"615", "ナナホシ管弦楽団"},
-{"616", "かいりきベア feat.flower"},
-{"617", "かいりきベア feat.GUMI"},
-{"618", "DiGiTAL WiNG feat. 花たん"},
-{"620", "REDALiCE & aran"},
-{"621", "TANO*C Sound Team"},
-{"622", "Akira Complex"},
-{"623", "Team Grimoire vs Laur"},
-{"624", "Aoi"},
-{"625", "Ino(chronoize) feat. 柳瀬マサキ"},
-{"626", "yaseta"},
-{"627", "owl*tree feat.yu*tree"},
-{"628", "onoken"},
-{"629", "Official髭男dism"},
-{"630", "かいりきベア feat.利香"},
-{"631", "CielArc"},
-{"633", "水野健治"},
-{"634", "作詞作曲:椎名もた 編曲:KTG 映像:Yuma Saito"},
-{"635", "Giga / 鏡音リン?レン / Vivid BAD SQUAD「プロジェクトセカイ カラフルステージ! feat. 初音ミク」"},
-{"636", "Orangestar feat.IA"},
-{"637", "owl*tree Remixed by Camellia"},
-{"638", "ササノマリイ / 初音ミク / 25時、ナイトコードで。「プロジェクトセカイ カラフルステージ! feat. 初音ミク」"},
-{"639", "HiTECH NINJA vs Cranky"},
-{"640", "DIVELA feat.桐谷こむぎ"},
-{"641", "黒魔"},
-{"642", "Juggernaut."},
-{"643", "TAKU1175 ft.駄々子"},
-{"644", "Endorfin."},
-{"645", "ツミキ × 宮下遊"},
-{"646", "nanobii"},
-{"647", "BlackY feat. Risa Yuzuki"},
-{"648", "Lime"},
-{"649", "Capchii"},
-{"651", "萩原 七々瀬(CV:東城 日沙子)"},
-{"652", "葛城 華(CV:丸岡 和佳奈)"},
-{"653", "小野 美苗(CV:伊藤 美来)"},
-{"654", "ゆゆうた"},
-{"655", "DJ Myosuke"},
-{"656", "Massive New Krew"},
-{"657", "IOSYS TRAX"},
-{"658", "曲:大畑拓也/歌:bitter flavor [桜井 春菜(CV:近藤 玲奈)、早乙女 彩華(CV:中島 唯)]"},
-{"659", "BlackY vs. Yooh"},
-{"660", "曲:Q-MHz/歌:オンゲキシューターズ"},
-{"661", "Mrs. GREEN APPLE"},
-{"662", "原田知世"},
-{"663", "涼宮ハルヒ(CV.平野 綾) TVアニメ「涼宮ハルヒの憂鬱」"},
-{"664", "covered by 光吉猛修"},
-{"665", "ずっと真夜中でいいのに。"},
-{"667", "angela"},
-{"668", "ビックカメラ"},
-{"669", "東方LostWord feat.いとうかなこ"},
-{"670", "hololive IDOL PROJECT"},
-{"671", "Kanaria"},
-{"672", "Ayase"},
-{"673", "タケモトピアノCM"},
-{"674", "P.I.N.A."},
-{"675", "羽生まゐご"},
-{"676", "煮ル果実"},
-{"677", "はるまきごはん"},
-{"678", "uma vs. モリモリあつし"},
-{"679", "DOT96"},
-{"680", "litmus*"},
-{"681", "かめりあ feat. ななひら"},
-{"682", "蜂屋ななし"},
-{"683", "奏音"},
-{"684", "五十嵐 撫子(CV:花井 美春)"},
-{"685", "LeaF & Optie"},
-{"686", "suzu"},
-{"687", "黒沢ダイスケ VS 穴山大輔"},
-{"688", "t+pazolite feat. しゃま(CV:種﨑 敦美) & みるく(CV:伊藤 あすか)"},
-{"689", "さつき が てんこもり feat.96猫"},
-{"690", "niki feat.noire"},
-{"691", "梅干茶漬け"},
-{"692", "Kai VS 大国奏音 VS 水野健治"},
-{"693", "Umiai"},
-{"694", "しょご/野村渉悟"},
-{"695", "Nhato"},
-{"696", "PRASTIK DANCEFLOOR"},
-{"697", "Kobaryo"},
-{"698", "An & Ryunosuke Kudo"},
-{"699", "Limonène (サノカモメ+月島春果)"},
-{"700", "HiTECH NINJA feat. RANASOL"},
-{"701", "隣の庭は青い(庭師+Aoi)"},
-{"702", "曲:齋藤大/歌:珠洲島 有栖(CV:長縄 まりあ)"},
-{"703", "曲:本多友紀(Arte Refact)/歌:オンゲキシューターズ"},
-{"704", "MAYA AKAI"},
-{"705", "舞ヶ原シンセ研究会"},
-{"707", "Acotto"},
-{"708", "t+pazolite (HARDCORE TANO*C) feat.TANO*C ALL STARS"},
-{"709", "YOASOBI"},
-{"710", "Ado"},
-{"711", "クレシェンドブルー [最上静香 (CV.田所あずさ)、北上麗花 (CV.平山笑美)、北沢志保 (CV.雨宮 天)、野々原 茜 (CV.小笠原早紀)、箱崎星梨花 (CV.麻倉もも)]"},
-{"712", "DRAMATIC STARS [天道 輝 (CV.仲村宗悟), 桜庭 薫 (CV.内田雄馬), 柏木 翼 (CV.八代 拓)]"},
-{"714", "COOL&CREATE × 宝鐘マリン"},
-{"715", "Sta feat. b"},
-{"717", "403"},
-{"718", "s-don as Iriss-Frantzz"},
-{"719", "Dachs"},
-{"720", "オーイシマサヨシ×加藤純一"},
-{"721", "ピノキオピー / 初音ミク / ワンダーランズ×ショウタイム「プロジェクトセカイ カラフルステージ! feat. 初音ミク」"},
-{"724", "SYNC.ART'S feat. 3L"},
-{"725", "キノシタ"},
-{"727", "ツユ"},
-{"728", "Rain Drops"},
-{"729", "かいりきベア?MARETU feat.初音ミク"},
-{"730", "キタニタツヤ"},
-{"731", "Chinozo"},
-{"732", "john"},
-{"733", "稲葉曇"},
-{"734", "鹿乃と宇崎ちゃん"},
-{"736", "Yunomi & nicamoq"},
-{"737", "じーざす(ワンダフル☆オポチュニティ!)"},
-{"739", "Unlucky Morpheus"},
-{"740", "すりぃ×相沢"},
-{"742", "須田景凪"},
-{"743", "ARuFa"},
-{"744", "Eve TVアニメ「呪術廻戦」第1クールオープニングテーマ"},
-{"745", "Mitchie M / 初音ミク / MORE MORE JUMP!「プロジェクトセカイ カラフルステージ! feat. 初音ミク」"},
-{"746", "DECO*27 / 初音ミク / Leo/need「プロジェクトセカイ カラフルステージ! feat. 初音ミク」"},
-{"747", "岸田教団&THE明星ロケッツ×草野華余子「東方ダンマクカグラ」"},
-{"748", "COOL&CREATE feat.ビートまりおとまろん「東方ダンマクカグラ」"},
-{"749", "BlackYooh vs. siromaru"},
-{"750", "烏屋茶房 feat. 利香"},
-{"751", "パソコン音楽クラブ feat.ぷにぷに電機"},
-{"752", "翡乃イスカ"},
-{"753", "Noah"},
-{"754", "rintaro soma"},
-{"768", "スペシャルウィーク (CV.和氣あず未)、サイレンススズカ (CV.高野麻里佳)、トウカイテイオー (CV.Machico)"},
-{"769", "Photon Maiden"},
-{"770", "Lyrical Lily"},
-{"771", "Tatsh x NAOKI"},
-{"773", "Sampling Masters AYA"},
-{"774", "NAOKI feat.小坂りゆ"},
-{"775", "NAOKI underground"},
-{"778", "柊マグネタイト"},
-{"783", "和田アキ子"},
-{"784", "Mastermind(xi+nora2r)"},
-{"785", "x0o0x_"},
-{"787", "Bitplane feat. 葉月ゆら"},
-{"789", "linear ring"},
-{"790", "ちいたな feat.flower"},
-{"791", "作詞:セガ社員、作曲:若草恵、歌:135"},
-};
- public static Dictionary addVersionDic = new Dictionary{
-{"0", "maimai"},
-{"1", "maimaiPLUS"},
-{"2", "GreeN"},
-{"3", "GreeNPLUS"},
-{"4", "ORANGE"},
-{"5", "ORANGEPLUS"},
-{"6", "PiNK"},
-{"7", "PiNKPLUS"},
-{"8", "MURASAKi"},
-{"9", "MURASAKiPLUS"},
-{"10", "MiLK"},
-{"11", "MiLKPLUS"},
-{"12", "FiNALE"},
-{"13", "maimaDX"},
-{"14", "maimaDXPLUS"},
-{"15", "Splash"},
-{"16", "SplashPLUS"},
-{"17", "UNiVERSE"},
-{"18", "UNiVERSEPLUS"},
-};
- public static Dictionary eventNameDic = new Dictionary{
-{"1", "無期限常時解放"},
-{"21091621", "210916_02_1"},
-{"21111225", "211112_02_5"},
-{"22011422", "220114_02_2"},
-{"22030321", "220303_02_1"},
-{"22032421", "220324_02_1"},
-{"22040121", "220401_02_1"},
-{"22040821", "220408_02_1"},
-{"22041521", "220415_02_1"},
-{"22041522", "220415_02_2"},
-{"22042821", "220428_02_1"},
-{"22042822", "220428_02_2"},
-};
- public static Dictionary subEventNameDic = new Dictionary{
-{"0", "解放なし"},
-{"1", "無期限常時解放"},
-{"22032421", "220324_02_1"},
-};
- public static Dictionary notesDesignerDic = new Dictionary{
-{"0", ""},
-{"1", "mai-Star"},
-{"2", "はっぴー"},
-{"3", "某S氏"},
-{"4", "Jack"},
-{"5", "Techno Kitchen"},
-{"6", "ロシェ@ペンギン"},
-{"7", "rioN"},
-{"8", "Revo@LC"},
-{"9", "ぴちネコ"},
-{"10", "チャン@DP皆伝"},
-{"11", "譜面-100号"},
-{"12", "ニャイン"},
-{"13", "maimai TEAM"},
-{"14", "合作だよ"},
-{"15", "しろいろ"},
-{"16", "畳返し"},
-{"17", "如月 ゆかり"},
-{"19", "原田ひろゆき"},
-{"20", "Moon Strix"},
-{"21", "玉子豆腐"},
-{"22", "ものくろっく"},
-{"23", "LabiLabi"},
-{"24", "小鳥遊さん"},
-{"25", "ミストルティン"},
-{"26", "すきやき奉行"},
-{"27", "サファ太"},
-{"29", "緑風 犬三郎"},
-{"31", "じゃこレモン"},
-{"32", "華火職人"},
-{"34", "譜面ボーイズからの挑戦状"},
-{"35", "“H”ack"},
-{"37", "Garakuta Scramble!"},
-{"38", "“H”ack underground"},
-{"39", "“Carpe diem” * HAN?BI"},
-{"40", "小鳥遊さん fused with Phoenix"},
-{"41", "safaTAmago"},
-{"42", "JAQ"},
-{"43", "Phoenix"},
-{"44", "-ZONE- SaFaRi"},
-{"45", "PANDORA BOXXX"},
-{"46", "PANDORA PARADOXXX"},
-{"47", "シチミヘルツ"},
-{"48", "うさぎランドリー"},
-{"49", "7.3Hz+Jack"},
-{"50", "譜面-100号とはっぴー"},
-{"51", "群青リコリス"},
-{"52", "jacK on Phoenix"},
-{"53", "KTM"},
-{"54", "シチミッピー"},
-{"55", "Safata.Hz"},
-{"56", "隅田川星人"},
-{"57", "ゲキ*チュウマイ Fumen Team"},
-{"58", "Sukiyaki vs Happy"},
-{"59", "7.3GHz vs Phoenix"},
-{"60", "?よ?ょ/∪ヽ”┠ (十,3?了??"},
-{"61", "譜面男子学院 中堅 小鳥 遊"},
-{"62", "七味星人"},
-{"63", "アマリリス"},
-{"64", "しちみりこりす"},
-{"65", "Anomaly Labyrinth"},
-{"66", "ものくロシェ"},
-{"67", "7.3GHz"},
-{"68", "サファ太 vs -ZONE- SaFaRi"},
-{"69", "The ALiEN"},
-{"70", "さふぁた"},
-{"71", "アミノハバキリ"},
-{"72", "Redarrow"},
-{"73", "みそかつ侍"},
-{"74", "ロシアンブラック"},
-{"75", "隅田川華火大会"},
-{"76", "はっぴー respects for 某S氏"},
-{"77", "7.3連発華火"},
-{"78", "-ZONE-Phoenix"},
-{"79", "小鳥遊さん vs 華火職人"},
-{"80", "SHICHIMI☆CAT"},
-{"81", "あまくちジンジャー"},
-{"82", "あまくちジンジャー@やべー新人"},
-{"83", "The ALiEN vs. Phoenix"},
-{"84", "翠楼屋"},
-{"85", "Jack & Licorice Gunjyo"},
-{"86", "7.3GHz -F?r The Legends-"},
-{"87", "一ノ瀬 リズ"},
-{"88", "超七味星人"},
-{"89", "KOP3rd with 翡翠マナ"},
-{"90", "小鳥遊チミ"},
-{"91", "作譜:翠楼屋"},
-{"92", "Hz-R.Arrow"},
-{"93", "チェシャ猫とハートのジャック"},
-{"999", "-"},
-};
-
-
- ///
- /// Set of track information stored
- ///
- private Dictionary information;
-
- ///
- /// Internal stored information set
- ///
- private XmlDocument takeInValue;
-
- ///
- /// Empty constructor
- ///
- public TrackInformation()
- {
- this.takeInValue = new XmlDocument();
- this.information = new Dictionary();
- this.FormatInformation();
- this.Update();
- }
-
- // ///
- // /// Construct track information from given location
- // ///
- // /// Place to load
- // public TrackInformation(string location)
- // {
- // {
- // this.takeInValue = new XmlDocument();
- // if (File.Exists(location + "Music.xml"))
- // {
- // this.takeInValue.Load(location + "Music.xml");
- // this.information=new Dictionary();
- // this.FormatInformation();
- // this.Update();
- // }
- // else
- // {
- // this.information=new Dictionary();
- // this.FormatInformation();
- // }
-
- // }
- // }
-
- ///
- /// Add in necessary nodes in information.
- ///
- public void FormatInformation()
- {
- this.information = new Dictionary
- {
- { "Name", "" },
- { "Sort Name", "" },
- { "Music ID", "" },
- { "Genre", "" },
- { "Version", "" },
- {"Version Number",""},
- { "BPM", "" },
- { "Composer", "" },
- { "Easy", "" },
- { "Easy Chart Maker", "" },
- { "Easy Chart Path", "" },
- { "Basic", "" },
- { "Basic Chart Maker", "" },
- { "Basic Chart Path", "" },
- { "Advanced", "" },
- { "Advanced Chart Maker", "" },
- { "Advanced Chart Path", "" },
- { "Expert", "" },
- { "Expert Chart Maker", "" },
- { "Expert Chart Path", "" },
- { "Master", "" },
- { "Master Chart Maker", "" },
- { "Master Chart Path", "" },
- { "Remaster", "" },
- { "Remaster Chart Maker", "" },
- { "Remaster Chart Path", "" },
- { "Utage", "" },
- { "Utage Chart Maker", "" },
- { "Utage Chart Path", "" },
- {"SDDX Suffix",""}
- };
- }
-
- ///
- /// Return the track name
- ///
- /// this.TrackName
- public string TrackName
- {
- get { return this.Information.GetValueOrDefault("Name") ?? throw new NullReferenceException("Name is not defined"); }
- set { this.information["Name"] = value; }
- }
-
- ///
- /// Return the sort name (basically English or Katakana)
- ///
- /// this.SortName
- public string TrackSortName
- {
- get { return this.Information.GetValueOrDefault("Sort Name") ?? throw new NullReferenceException("Sort Name is not defined"); }
- set { this.information["Sort Name"] = value; }
- }
-
- ///
- /// Return the track ID (4 digit, having 00 for SD 01 for DX)
- ///
- /// this.TrackID
- public string TrackID
- {
- get { return this.Information.GetValueOrDefault("Music ID") ?? throw new NullReferenceException("Music ID is not defined"); }
- set { this.information["Music ID"] = value; }
- }
-
- ///
- /// Return the track genre (By default cabinet 6 categories)
- ///
- /// this.TrackGenre
- public string TrackGenre
- {
- get { return this.Information.GetValueOrDefault("Genre") ?? throw new NullReferenceException("Genre is not defined"); }
- set { this.information["Genre"] = value; }
- }
-
- ///
- /// Return the track global BPM
- ///
- /// this.TrackBPM
- public string TrackBPM
- {
- get { return this.Information.GetValueOrDefault("BPM") ?? throw new NullReferenceException("Genre is not defined"); }
- set { this.information["BPM"] = value; }
- }
-
- ///
- /// Return the track composer
- ///
- /// this.TrackComposer
- public string TrackComposer
- {
- get { return this.Information.GetValueOrDefault("Composer") ?? throw new NullReferenceException("Genre is not defined"); }
- set { this.information["Composer"] = value; }
- }
-
- ///
- /// Return the most representative level of the track = by default master
- ///
- /// this.MasterTrackLevel
- public string TrackSymbolicLevel
- {
- get { return this.Information.GetValueOrDefault("Master") ?? throw new NullReferenceException("Master level is not defined"); }
- set { this.information["Master"] = value; }
- }
-
- ///
- /// Return the suffix of Track title for export
- ///
- /// this.TrackSubstituteName"_DX" if is DX chart
- public string DXChartTrackPathSuffix
- {
- get
- {
- string musicID = this.Information.GetValueOrDefault("Music ID") ?? throw new NullReferenceException("Music ID is not Defined");
- if (musicID.Length > 4)
- return "_DX";
- else return "";
- }
- }
-
- ///
- /// Returns if the track is Standard or Deluxe
- ///
- /// SD if standard, DX if deluxe
- public string StandardDeluxePrefix
- {
- get
- {
- string musicID = this.Information.GetValueOrDefault("Music ID") ?? throw new NullReferenceException("Music ID is not Defined");
- if (musicID.Length > 4)
- return "DX";
- else return "SD";
- }
- }
-
- ///
- /// Title suffix for better distinguish
- ///
- /// [SD] if Standard and [DX] if Deluxe
- public string StandardDeluxeSuffix
- {
- get
- {
- return "[" + this.StandardDeluxePrefix + "]";
- }
- }
-
- ///
- /// See if the chart is DX chart.
- ///
- /// True if is DX, false if SD
- public bool IsDXChart
- {
- get
- {
- string musicID = this.Information.GetValueOrDefault("Music ID") ?? throw new NullReferenceException("Music ID is not Defined");
- return musicID.Length > 4;
- }
- }
-
- ///
- /// Return the XML node that has same name with
- ///
- ///
- ///
- public XmlNodeList GetMatchNodes(string name)
- {
- XmlNodeList result = this.takeInValue.GetElementsByTagName(name);
- return result;
- }
-
- ///
- /// Return this.TrackVersion
- ///
- /// this.TrackVersion
- public string TrackVersion
- {
-
- get
- {
- string version = this.Information.GetValueOrDefault("Version") ?? throw new NullReferenceException("Version is not Defined");
- return version;
- }
- set { this.information["Version"] = value; }
- }
-
- ///
- /// Return this.TrackVersionNumber
- ///
- /// this.TrackVersionNumber
- public string TrackVersionNumber
- {
-
- get
- {
- string versionNumber = this.Information.GetValueOrDefault("Version Number") ?? throw new NullReferenceException("Version is not Defined");
- return versionNumber;
- }
- set { this.information["Version Number"] = value; }
- }
-
- ///
- /// Give access to TakeInValue if necessary
- ///
- /// this.TakeInValue as XMLDocument
- public XmlDocument TakeInValue
- {
- get { return takeInValue; }
- set { this.takeInValue = value; }
- }
-
- ///
- /// Give access to this.Information
- ///
- /// this.Information as Dictionary
- public Dictionary Information
- {
- get { return information; }
- set { this.information = value; }
- }
-
- ///
- /// Save the information to given path
- ///
- /// Path to save the information
- public void Save(string location)
- {
- this.takeInValue.Save(location);
- }
-
- ///
- /// Update information
- ///
- public abstract void Update();
- }
-}
\ No newline at end of file
diff --git a/XMaiL.cs b/XMaiL.cs
deleted file mode 100644
index 22a119f..0000000
--- a/XMaiL.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-using System;
-using System.Xml;
-
-namespace MaichartConverter
-{
- ///
- /// Using xml to store maicharts
- ///
- public class XMaiL : Chart, ICompiler
- {
- ///
- /// Storage of Xml file
- ///
- private XmlDocument StoredXMailL;
-
- ///
- /// Default constructor
- ///
- public XMaiL()
- {
- this.Notes = new List();
- this.BPMChanges = new BPMChanges();
- this.MeasureChanges = new MeasureChanges();
- this.StoredChart = new List>();
- this.Information = new Dictionary();
- this.StoredXMailL = new XmlDocument();
- this.Update();
- }
-
- ///
- /// Construct XMaiL with given notes, bpm change definitions and measure change definitions.
- ///
- /// Notes in XMaiL
- /// BPM Changes: Initial BPM is NEEDED!
- /// Measure Changes: Initial Measure is NEEDED!
- public XMaiL(List notes, BPMChanges bpmChanges, MeasureChanges measureChanges)
- {
- this.Notes = notes;
- this.BPMChanges = bpmChanges;
- this.MeasureChanges = measureChanges;
- this.StoredChart = new List>();
- this.Information = new Dictionary();
- this.StoredXMailL = new XmlDocument();
- this.Update();
- }
-
- ///
- /// Construct XMaiL with tokens given
- ///
- /// Tokens given
- public XMaiL(string[] tokens)
- {
- Chart takenIn = new Ma2Parser().ChartOfToken(tokens);
- this.Notes = takenIn.Notes;
- this.BPMChanges = takenIn.BPMChanges;
- this.MeasureChanges = takenIn.MeasureChanges;
- this.StoredChart = new List>();
- this.Information = new Dictionary();
- this.StoredXMailL = new XmlDocument();
- this.Update();
- }
-
- ///
- /// Construct XMaiL with existing values
- ///
- /// Existing good brother
- public XMaiL(Chart takenIn)
- {
- this.Notes = takenIn.Notes;
- this.BPMChanges = takenIn.BPMChanges;
- this.MeasureChanges = takenIn.MeasureChanges;
- this.StoredChart = new List>();
- this.Information = new Dictionary();
- this.StoredXMailL = new XmlDocument();
- this.Update();
- }
-
- public override bool CheckValidity()
- {
- bool result = this == null;
- // Not yet implemented
- return result;
- }
-
- public override string Compose()
- {
- return this.StoredXMailL.ToString() ?? throw new NullReferenceException();
- }
-
- public override string Compose(BPMChanges bpm, MeasureChanges measure)
- {
- throw new NotImplementedException();
- }
-
- public override void Update()
- {
- XmlDeclaration xmlDecl = this.StoredXMailL.CreateXmlDeclaration("1.0", "UTF-8", null);
- this.StoredXMailL.AppendChild(xmlDecl);
- XmlElement root = this.StoredXMailL.CreateElement("XMaiL");
- XmlAttribute rootVersion = this.StoredXMailL.CreateAttribute("1.0");
- root.Attributes.Append(rootVersion);
- this.StoredXMailL.AppendChild(root);
- XmlElement information = this.StoredXMailL.CreateElement("TrackInformation");
- }
- }
-}
\ No newline at end of file
diff --git a/XMaiLTemplete.xml b/XMaiLTemplete.xml
deleted file mode 100644
index 7662372..0000000
--- a/XMaiLTemplete.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/XmlInformation.cs b/XmlInformation.cs
deleted file mode 100644
index 9279817..0000000
--- a/XmlInformation.cs
+++ /dev/null
@@ -1,313 +0,0 @@
-using System.Xml;
-
-namespace MaichartConverter
-{
- ///
- /// Using Xml to store trackInformation
- ///
- public class XmlInformation : TrackInformation, IXmlUtility
- {
- ///
- /// Using take in Xml to store trackInformation:
- ///
- public XmlInformation()
- {
- this.Update();
- }
-
- public XmlInformation(string location)
- {
- {
- if (File.Exists(location + "Music.xml"))
- {
- this.TakeInValue.Load(location + "Music.xml");
- this.Update();
- }
- else
- {
- this.Update();
- }
-
- }
- }
-
- ///
- /// Generate new music.xml for export
- ///
- public void GenerateEmptyStoredXML()
- {
- this.TakeInValue = new XmlDocument();
- //Create declaration
- XmlDeclaration dec = this.TakeInValue.CreateXmlDeclaration("1.0", "utf-8", "yes");
- this.TakeInValue.AppendChild(dec);
- //Create Root and append attributes
- XmlElement root = this.TakeInValue.CreateElement("MusicData");
- XmlAttribute xsi = this.TakeInValue.CreateAttribute("xmlns:xsi");
- xsi.Value = "http://www.w3.org/2001/XMLSchema-instance";
- XmlAttribute xsd = this.TakeInValue.CreateAttribute("xmlns:xsd");
- xsd.Value = "http://www.w3.org/2001/XMLSchema";
- root.AppendChild(xsi);
- root.AppendChild(xsd);
-
- //Create tags. *data name: inner text = music0xxxxx
- XmlElement dataName = this.TakeInValue.CreateElement("dataName");
- dataName.InnerText = "music" + Program.CompensateZero(this.Information["Music ID"]);
- XmlElement netOpenName = this.TakeInValue.CreateElement("netOpenName");
- XmlElement netOpenNameId = this.TakeInValue.CreateElement("id");
- netOpenNameId.InnerText = "0";
- XmlElement netOpenNameStr = this.TakeInValue.CreateElement("str");
- netOpenNameStr.InnerText = "Net190711";
- XmlElement releaseTagName = this.TakeInValue.CreateElement("releaseTagName");
- XmlElement releaseTagNameId = this.TakeInValue.CreateElement("id");
- releaseTagNameId.InnerText = Array.IndexOf(TrackInformation.addVersion,this.Information["Version Number"]).ToString();
- XmlElement releaseTagNameStr = this.TakeInValue.CreateElement("str");
- releaseTagNameStr.InnerText = this.Information["Version Number"];
- XmlElement disable = this.TakeInValue.CreateElement("disable");
- disable.InnerText = "false";
- XmlElement name = this.TakeInValue.CreateElement("name");
- XmlElement nameId = this.TakeInValue.CreateElement("id");
- nameId.InnerText = this.TrackID;
- XmlElement nameStr = this.TakeInValue.CreateElement("str");
- nameStr.InnerText = this.TrackName;
- XmlElement rightsInfoName = this.TakeInValue.CreateElement("rightsInfoName");
- XmlElement rightsInfoNameId = this.TakeInValue.CreateElement("id");
- rightsInfoNameId.InnerText = "0";
- XmlElement rightsInfoNameStr = this.TakeInValue.CreateElement("str");
- rightsInfoNameId.InnerText = "";
- XmlElement sortName = this.TakeInValue.CreateElement("sortName");
- sortName.InnerText = this.TrackSortName;
- XmlElement artistName = this.TakeInValue.CreateElement("artistName");
- XmlElement artistNameId = this.TakeInValue.CreateElement("id");
- artistNameId.InnerText = "0";
- XmlElement artistNameStr = this.TakeInValue.CreateElement("str");
- artistNameStr.InnerText = this.Information["Composer"];
- XmlElement genreName = this.TakeInValue.CreateElement("genreName");
- XmlElement genreNameId = this.TakeInValue.CreateElement("id");
- genreNameId.InnerText = "10" + Array.IndexOf(TrackInformation.genre, this.Information["Genre"]).ToString();
- XmlElement genreNameStr = this.TakeInValue.CreateElement("str");
- genreNameStr.InnerText = this.TrackGenre;
- XmlElement bpm = this.TakeInValue.CreateElement("bpm");
- bpm.InnerText = this.TrackBPM;
- XmlElement version = this.TakeInValue.CreateElement("version");
- version.InnerText = "19000";
- XmlElement addVersion = this.TakeInValue.CreateElement("addVersion");
- XmlElement addVersionId = this.TakeInValue.CreateElement("id");
- addVersionId.InnerText = this.TrackVersionNumber;
- XmlElement addVersionStr = this.TakeInValue.CreateElement("str");
- addVersionStr.InnerText = TrackInformation.shortVersion[int.Parse(this.TrackVersionNumber)];
- XmlElement movieName = this.TakeInValue.CreateElement("movieName");
- XmlElement movieNameId = this.TakeInValue.CreateElement("id");
- movieNameId.InnerText = this.TrackID;
- XmlElement movieNameStr = this.TakeInValue.CreateElement("str");
- movieNameStr.InnerText = this.TrackName;
- XmlElement cueName = this.TakeInValue.CreateElement("cueName");
- XmlElement cueNameId = this.TakeInValue.CreateElement("id");
- cueNameId.InnerText = this.TrackID;
- XmlElement cueNameStr = this.TakeInValue.CreateElement("str");
- cueNameStr.InnerText = this.TrackName;
- XmlElement dressCode = this.TakeInValue.CreateElement("dressCode");
- dressCode.InnerText = "false";
- XmlElement eventName = this.TakeInValue.CreateElement("eventName");
- XmlElement eventNameId = this.TakeInValue.CreateElement("id");
- eventNameId.InnerText = "1";
- XmlElement eventNameStr = this.TakeInValue.CreateElement("str");
- eventNameStr.InnerText = "無期限常時解放";
- XmlElement subEventName = this.TakeInValue.CreateElement("subEventName");
- XmlElement subEventNameId = this.TakeInValue.CreateElement("id");
- subEventNameId.InnerText = "1";
- XmlElement subEventNameStr = this.TakeInValue.CreateElement("str");
- subEventNameStr.InnerText = "無期限常時解放";
- XmlElement lockType = this.TakeInValue.CreateElement("lockType");
- lockType.InnerText = "0";
- XmlElement subLockType = this.TakeInValue.CreateElement("subLockType");
- subLockType.InnerText = "1";
- XmlElement dotNetListView = this.TakeInValue.CreateElement("dotNetListView");
- dotNetListView.InnerText = "true";
- XmlElement notesData = this.TakeInValue.CreateElement("notesData");
- for (int i = 0; i < 6; i++)
- {
- XmlElement noteCandidate = this.TakeInValue.CreateElement("Notes");
- XmlElement fileCandidate = this.TakeInValue.CreateElement("file");
- XmlElement pathCandidate = this.TakeInValue.CreateElement("path");
- pathCandidate.InnerText = Program.CompensateZero(this.TrackID) + "_0" + i + ".ma2";
- fileCandidate.AppendChild(pathCandidate);
- XmlElement levelCandidate = this.TakeInValue.CreateElement("level");
- }
- XmlElement jacketFile = this.TakeInValue.CreateElement("jacketFile");
- XmlElement thumbnailName = this.TakeInValue.CreateElement("thumbnailName");
- XmlElement rightFile = this.TakeInValue.CreateElement("rightFile");
- XmlElement priority = this.TakeInValue.CreateElement("priority");
- priority.InnerText = "0";
-
-
-
-
- }
-
- public XmlElement CreateNotesInformation(Dictionary information, int chartIndex)
- {
- XmlElement result = this.TakeInValue.CreateElement("Notes");
-
- return result;
- }
-
- public override void Update()
- {
- XmlNodeList nameCandidate = this.TakeInValue.GetElementsByTagName("name");
- XmlNodeList bpmCandidate = this.TakeInValue.GetElementsByTagName("bpm");
- XmlNodeList chartCandidate = this.TakeInValue.GetElementsByTagName("Notes");
- XmlNodeList composerCandidate = this.TakeInValue.GetElementsByTagName("artistName");
- XmlNodeList genreCandidate = this.TakeInValue.GetElementsByTagName("genreName");
- XmlNodeList addVersionCandidate = this.TakeInValue.GetElementsByTagName("AddVersion");
- XmlNodeList sortNameCandidate = this.TakeInValue.GetElementsByTagName("sortName");
- XmlNodeList versionNumberCandidate = this.TakeInValue.GetElementsByTagName("releaseTagName");
- //Add in name and music ID.
- ////Add BPM
- //this.information.Add("BPM",bpmCandidate[0].InnerText);
- foreach (XmlNode candidate in nameCandidate)
- {
- if (this.TrackID.Equals(""))
- {
- var idCandidate = candidate["id"] ?? throw new NullReferenceException();
- var strCandidate = candidate["str"] ?? throw new NullReferenceException();
- this.TrackID = idCandidate.InnerText;
- this.TrackName = strCandidate.InnerText;
- }
- }
- foreach (XmlNode candidate in chartCandidate)
- {
- try
- {
- var pathCandidate = candidate["file"] ?? throw new NullReferenceException();
- pathCandidate = pathCandidate["path"] ?? throw new NullReferenceException();
- var enableCandidate = candidate["isEnable"] ?? throw new NullReferenceException();
- if (pathCandidate.InnerText.Contains("00.ma2") && enableCandidate.InnerText.Equals("true"))
- {
- var musicLevelIDCandidate = candidate["musicLevelID"] ?? throw new NullReferenceException();
- var notesDesignerCandidate = candidate["notesDesigner"] ?? throw new NullReferenceException();
- notesDesignerCandidate = notesDesignerCandidate["str"] ?? throw new NullReferenceException();
- var fileCandidate = candidate["file"] ?? throw new NullReferenceException();
- fileCandidate = fileCandidate["path"] ?? throw new NullReferenceException();
- this.Information["Basic"] = level[Int32.Parse(musicLevelIDCandidate.InnerText) - 1];
- this.Information["Basic Chart Maker"] = notesDesignerCandidate.InnerText;
- this.Information["Basic Chart Path"] = fileCandidate.InnerText;
- }
- else if (pathCandidate.InnerText.Contains("01.ma2") && enableCandidate.InnerText.Equals("true"))
- {
- var musicLevelIDCandidate = candidate["musicLevelID"] ?? throw new NullReferenceException();
- var notesDesignerCandidate = candidate["notesDesigner"] ?? throw new NullReferenceException();
- notesDesignerCandidate = notesDesignerCandidate["str"] ?? throw new NullReferenceException();
- var fileCandidate = candidate["file"] ?? throw new NullReferenceException();
- fileCandidate = fileCandidate["path"] ?? throw new NullReferenceException();
- this.Information["Advanced"] = level[Int32.Parse(musicLevelIDCandidate.InnerText) - 1];
- this.Information["Advanced Chart Maker"] = notesDesignerCandidate.InnerText;
- this.Information["Advanced Chart Path"] = fileCandidate.InnerText;
- }
- else if (pathCandidate.InnerText.Contains("02.ma2") && enableCandidate.InnerText.Equals("true"))
- {
- var musicLevelIDCandidate = candidate["musicLevelID"] ?? throw new NullReferenceException();
- var notesDesignerCandidate = candidate["notesDesigner"] ?? throw new NullReferenceException();
- notesDesignerCandidate = notesDesignerCandidate["str"] ?? throw new NullReferenceException();
- var fileCandidate = candidate["file"] ?? throw new NullReferenceException();
- fileCandidate = fileCandidate["path"] ?? throw new NullReferenceException();
- this.Information["Expert"] = level[Int32.Parse(musicLevelIDCandidate.InnerText) - 1];
- this.Information["Expert Chart Maker"] = notesDesignerCandidate.InnerText;
- this.Information["Expert Chart Path"] = fileCandidate.InnerText;
- }
- else if (pathCandidate.InnerText.Contains("03.ma2") && enableCandidate.InnerText.Equals("true"))
- {
- var musicLevelIDCandidate = candidate["musicLevelID"] ?? throw new NullReferenceException();
- var notesDesignerCandidate = candidate["notesDesigner"] ?? throw new NullReferenceException();
- notesDesignerCandidate = notesDesignerCandidate["str"] ?? throw new NullReferenceException();
- var fileCandidate = candidate["file"] ?? throw new NullReferenceException();
- fileCandidate = fileCandidate["path"] ?? throw new NullReferenceException();
- this.Information["Master"] = level[Int32.Parse(musicLevelIDCandidate.InnerText) - 1];
- this.Information["Master Chart Maker"] = notesDesignerCandidate.InnerText;
- this.Information["Master Chart Path"] = fileCandidate.InnerText;
- }
- else if (pathCandidate.InnerText.Contains("04.ma2") && enableCandidate.InnerText.Equals("true"))
- {
- var musicLevelIDCandidate = candidate["musicLevelID"] ?? throw new NullReferenceException();
- var notesDesignerCandidate = candidate["notesDesigner"] ?? throw new NullReferenceException();
- notesDesignerCandidate = notesDesignerCandidate["str"] ?? throw new NullReferenceException();
- var fileCandidate = candidate["file"] ?? throw new NullReferenceException();
- fileCandidate = fileCandidate["path"] ?? throw new NullReferenceException();
- this.Information["Remaster"] = level[Int32.Parse(musicLevelIDCandidate.InnerText) - 1];
- this.Information["Remaster Chart Maker"] = notesDesignerCandidate.InnerText;
- this.Information["Remaster Chart Path"] = fileCandidate.InnerText;
- }
-
- }
- catch (Exception ex)
- {
- Console.WriteLine("There is no such chart: " + ex.Message);
- }
- }
-
- foreach (XmlNode candidate in bpmCandidate)
- {
- {
- if (this.TrackBPM.Equals(""))
- {
- this.TrackBPM = candidate.InnerText;
- }
- }
- }
-
- foreach (XmlNode candidate in sortNameCandidate)
- {
- {
- if (this.TrackSortName.Equals(""))
- {
- this.TrackSortName = candidate.InnerText;
- }
- }
- }
-
- foreach (XmlNode candidate in composerCandidate)
- {
- {
- if (this.TrackComposer.Equals(""))
- {
- var strCandidate = candidate["str"] ?? throw new NullReferenceException();
- this.TrackComposer = strCandidate.InnerText;
- }
- }
- }
-
- foreach (XmlNode candidate in genreCandidate)
- {
- {
- if (this.TrackGenre.Equals(""))
- {
- var strCandidate = candidate["str"] ?? throw new NullReferenceException();
- this.TrackGenre = strCandidate.InnerText;
- }
- }
- }
-
- foreach (XmlNode candidate in versionNumberCandidate)
- {
- {
- if (this.TrackVersionNumber.Equals(""))
- {
- var strCandidate = candidate["str"] ?? throw new NullReferenceException();
- this.TrackVersionNumber = strCandidate.InnerText;
- }
- }
- }
-
- foreach (XmlNode candidate in addVersionCandidate)
- {
- {
- if (this.TrackVersion.Equals(""))
- {
- var idCandidate = candidate["id"] ?? throw new NullReferenceException();
- this.TrackVersion = version[Int32.Parse(idCandidate.InnerText)];
- }
- }
- }
- this.Information["SDDX Suffix"] = this.StandardDeluxeSuffix;
- }
- }
-}