Esempio n. 1
0
        private static NoteData GetNoteData(ref int iterator, ref string[] contents)
        {
            NoteData noteData = new NoteData();

            iterator++;
            noteData.Mode = new StringBuilder(contents[iterator].Trim()).Remove(contents[iterator].Trim().Length - 1, 1).ToString();
            iterator++;
            noteData.Description = new StringBuilder(contents[iterator].Trim()).Remove(contents[iterator].Trim().Length - 1, 1).ToString();
            iterator++;
            noteData.Name = new StringBuilder(contents[iterator].Trim()).Remove(contents[iterator].Trim().Length - 1, 1).ToString();
            iterator++;
            noteData.Meter = new StringBuilder(contents[iterator].Trim()).Remove(contents[iterator].Trim().Length - 1, 1).ToString();
            iterator++;

            GetNoteSegments(ref iterator, ref contents, ref noteData);
            return(noteData);
        }
Esempio n. 2
0
        private static void SongdataToNotedata(Segment[] segments, ref NoteData noteData)
        {
            List <float> L = new List <float>();
            List <float> D = new List <float>();
            List <float> U = new List <float>();
            List <float> R = new List <float>();

            for (int i = 0; i < segments.Length; i++)
            {
                for (int j = 0; j < segments[i].rows.Count; j++)
                {
                    Row row = segments[i].rows[j];
                    if (row.L)
                    {
                        L.Add(((4f / segments[i].rows.Count) * j) + i * 4);
                    }
                    if (row.D)
                    {
                        D.Add(((4f / segments[i].rows.Count) * j) + i * 4);
                    }
                    if (row.U)
                    {
                        U.Add(((4f / segments[i].rows.Count) * j) + i * 4);
                    }
                    if (row.R)
                    {
                        R.Add(((4f / segments[i].rows.Count) * j) + i * 4);
                    }
                }
            }

            noteData.L = L;
            noteData.D = D;
            noteData.U = U;
            noteData.R = R;
        }
 public void AddNoteData(NoteData noteData)
 {
     this.noteData.Add(noteData);
 }