private parseChordMask ( Sng2014HSL notes, uint p ) : void | ||
notes | Sng2014HSL | |
p | uint | |
return | void |
internal static SongChord2014[] Parse(Sng2014HSL.Sng sngData, Sng2014HSL.NotesSection notesSection) { var chords = new List <SongChord2014>(); for (var i = 0; i < notesSection.Count; i++) { if (notesSection.Notes[i].ChordId == -1) { continue; //Skip single notes (get only chord notes) } var chord = new SongChord2014(); chord.ChordId = notesSection.Notes[i].ChordId; chord.Time = notesSection.Notes[i].Time; // Debug.WriteLine("Song2014 chord.ChordId = " + chord.ChordId); // TECHNIQUES chord.parseChordMask(notesSection.Notes[i], notesSection.Notes[i].NoteMask); // CHORD NOTES (WITHOUT TECHNIQUES) + NOT HIGH DENSITY if (chord.HighDensity != 1) { chord.ParseChordNotes(sngData.Chords.Chords[chord.ChordId]); } // CHORD NOTES (WITH TECHNIQUES) var cnId = notesSection.Notes[i].ChordNotesId; if (cnId != -1) { if (sngData.ChordNotes.ChordNotes.Length > cnId) { chord.ParseChordNotes(sngData.Chords.Chords[chord.ChordId], sngData.ChordNotes.ChordNotes[cnId]); } } chords.Add(chord); } return(chords.ToArray()); }
internal static SongChord2014[] Parse(Sng2014HSL.Sng sngData, Sng2014HSL.NotesSection notesSection) { var chords = new List<SongChord2014>(); for (var i = 0; i < notesSection.Count; i++) { if (notesSection.Notes[i].ChordId == -1) continue; //Skip single notes (get only chord notes) var chord = new SongChord2014(); chord.ChordId = notesSection.Notes[i].ChordId; chord.Time = notesSection.Notes[i].Time; // TECHNIQUES chord.parseChordMask(notesSection.Notes[i], notesSection.Notes[i].NoteMask); // CHORD NOTES (WITHOUT TECHNIQUES) + NOT HIGH DENSITY if (chord.HighDensity != 1) { chord.ParseChordNotes(sngData.Chords.Chords[chord.ChordId]); } // CHORD NOTES (WITH TECHNIQUES) var cnId = notesSection.Notes[i].ChordNotesId; if (cnId != -1) { if (sngData.ChordNotes.ChordNotes.Length > cnId) chord.ParseChordNotes(sngData.Chords.Chords[chord.ChordId], sngData.ChordNotes.ChordNotes[cnId]); } chords.Add(chord); } return chords.ToArray(); }