Beispiel #1
0
 public static RawNotePoint Interpolate(RawNoteTrace trace, double t)
 {
     for (int i = 0; i < trace.points.Count - 1; i++) {
         if (trace.points[i + 1].time >= t) {
             RawNotePoint p1 = trace.points[i];
             RawNotePoint p2 = trace.points[i + 1];
             var rawNotePoint = Interpolate(p1, p2, (t-p1.time)/ (p2.time-p1.time));
             Debug.WriteLine(rawNotePoint.time);
             return rawNotePoint;
         }
     }
     return trace.points[trace.points.Count - 1];
 }
Beispiel #2
0
 public RawNoteTrace ToRaw(NoteTrace trace)
 {
     var t = new RawNoteTrace();
     foreach (NotePoint point in trace.points) {
         t.points.Add(ToRaw(point));
     }
     return t;
 }
Beispiel #3
0
 public void Initialize(NoteChart chart)
 {
     var rnt = new RawNoteTrace[chart.traces.Count];
     for (int i = 0; i < chart.traces.Count; i++) {
         NoteTrace trace = chart.traces[i];
         rnt[i] = chart.ToRaw(trace);
     }
     foreach (RawNoteTrace trace in rnt) {
         future.Add(trace);
     }
     bpm = chart.bpm;
 }