private SongNote2014 GetNoteInfo(SongNote songNote) { SongNote2014 songNote2014 = new SongNote2014(); songNote2014.Bend = (float)songNote.Bend; // tested ... BendValue time causing in game hangs if off by 0.001f if (songNote.Bend > 0) { var bendValues = new List<BendValue>(); // CRITICAL CALCULATION - DO NOT CHANGE - MULTIPLIER VALUE MUST BE 0.3333 TO ACHEIVE PROPER ACCURACY AND MATCH EOF OUTPUT bendValues.Add(new BendValue { Step = songNote.Bend, Time = (float)Math.Round((songNote.Sustain * 0.3333 / songNote.Bend) + songNote.Time, 3), Unk5 = 0 }); songNote2014.BendValues = bendValues.ToArray(); } songNote2014.Fret = (sbyte)songNote.Fret; songNote2014.HammerOn = (byte)songNote.HammerOn; songNote2014.Harmonic = (byte)songNote.Harmonic; songNote2014.Hopo = (byte)songNote.Hopo; songNote2014.Ignore = (byte)songNote.Ignore; songNote2014.PalmMute = (byte)songNote.PalmMute; songNote2014.Pluck = (sbyte)songNote.Pluck; // -1; // EOF is non-compliant songNote2014.PullOff = (byte)songNote.PullOff; songNote2014.Slap = (sbyte)songNote.Slap; // -1; // EOF is non-compliant songNote2014.SlideTo = (sbyte)songNote.SlideTo; songNote2014.String = (byte)songNote.String; songNote2014.Sustain = (float)songNote.Sustain; songNote2014.Time = (float)songNote.Time; songNote2014.Tremolo = (byte)songNote.Tremolo; // initialize elements not present in RS1 songNote2014.LinkNext = 0; songNote2014.Accent = 0; songNote2014.LeftHand = -1; songNote2014.Mute = 0; songNote2014.HarmonicPinch = 0; songNote2014.PickDirection = 0; songNote2014.RightHand = -1; songNote2014.SlideUnpitchTo = -1; songNote2014.Tap = 0; songNote2014.Vibrato = 0; return songNote2014; }
private void ParseChordNotes(Sng2014HSL.Chord template, Sng2014HSL.ChordNotes chordNotes = null) { var notes = new List<SongNote2014>(); var notSetup = unchecked((sbyte)-1); for (var i = 0; i < 6; i++) { if ((chordNotes != null && chordNotes.NoteMask[i] != 0) || //notes with techniques (chordNotes == null && template.Frets[i] != 255)) { // Notes without techniques var cnote = new SongNote2014(); // SETUP DEFAULT VALUES cnote.RightHand = notSetup; cnote.LeftHand = notSetup; cnote.SlideTo = notSetup; cnote.SlideUnpitchTo = notSetup; cnote.Tap = (byte)0; cnote.Slap = notSetup; cnote.Pluck = notSetup; if ((chordNotes != null && chordNotes.NoteMask[i] != 0)) { // SETUP FROM OWN PROPERTIES cnote.parseNoteMask(chordNotes.NoteMask[i]); cnote.SlideTo = (sbyte)chordNotes.SlideTo[i]; cnote.SlideUnpitchTo = (sbyte)chordNotes.SlideUnpitchTo[i]; cnote.Vibrato = chordNotes.Vibrato[i]; cnote.BendValues = BendValue.Parse(chordNotes.BendData[i].BendData32); //Fix bend status from step in bendvalues if (cnote.BendValues != null && cnote.BendValues.Length > 0) foreach (var bend in cnote.BendValues) if (cnote.Bend < bend.Step) cnote.Bend = (byte)Math.Round(bend.Step); } // BASIC INFO cnote.Time = this.Time; cnote.Fret = (sbyte)template.Frets[i]; cnote.LeftHand = (sbyte)template.Fingers[i]; cnote.String = (byte)i; notes.Add(cnote); } } this.ChordNotes = notes.ToArray(); }
private SongNote2014 DecodeChordTemplate(SongChord songChord, int gString, int fret) { // RS2014 //<chord time="83.366" linkNext="0" accent="0" chordId="19" fretHandMute="0" highDensity="0" ignore="0" palmMute="0" hopo="0" strum="down"> // <chordNote time="83.366" linkNext="0" accent="0" bend="0" fret="3" hammerOn="0" harmonic="0" hopo="0" ignore="0" leftHand="-1" mute="0" palmMute="0" pluck="-1" pullOff="0" slap="-1" slideTo="-1" string="4" sustain="0.000" tremolo="0" harmonicPinch="0" pickDirection="0" rightHand="-1" slideUnpitchTo="-1" tap="0" vibrato="0"/> // <chordNote time="83.366" linkNext="0" accent="0" bend="0" fret="3" hammerOn="0" harmonic="0" hopo="0" ignore="0" leftHand="-1" mute="0" palmMute="0" pluck="-1" pullOff="0" slap="-1" slideTo="-1" string="5" sustain="0.000" tremolo="0" harmonicPinch="0" pickDirection="0" rightHand="-1" slideUnpitchTo="-1" tap="0" vibrato="0"/> //</chord> // RS1 //<chord time="83.366" chordId="1" highDensity="0" ignore="0" strum="down"/> //<chordTemplate chordName="A" finger0="-1" finger1="0" finger2="1" finger3="1" finger4="1" finger5="-1" fret0="-1" fret1="0" fret2="2" fret3="2" fret4="2" fret5="-1"/> // finger > -1 is actual string SongNote2014 songNote2014 = new SongNote2014(); songNote2014.Time = songChord.Time; songNote2014.LinkNext = 0; songNote2014.Accent = 0; songNote2014.Bend = 0; songNote2014.Fret = (sbyte)fret; songNote2014.HammerOn = 0; songNote2014.Hopo = 0; songNote2014.Ignore = songChord.Ignore; songNote2014.LeftHand = -1; songNote2014.Mute = 0; songNote2014.PalmMute = 0; songNote2014.Pluck = -1; songNote2014.PullOff = 0; songNote2014.Slap = -1; songNote2014.SlideTo = -1; songNote2014.String = (byte)gString; songNote2014.Sustain = 0.000f; songNote2014.Tremolo = 0; songNote2014.HarmonicPinch = 0; songNote2014.PickDirection = 0; songNote2014.RightHand = -1; songNote2014.SlideUnpitchTo = -1; songNote2014.Tap = 0; songNote2014.Vibrato = 0; return songNote2014; }
private void parseNote(Song2014 xml, SongNote2014 note, Notes n, Notes prev) { n.NoteMask = parseNoteMask(note, true); // numbering (NoteFlags) will be set later n.Time = note.Time; n.StringIndex = note.String; // actual fret number n.FretId = (Byte)note.Fret; // anchor fret will be set later n.AnchorFretId = unchecked((Byte)(-1)); // will be overwritten n.AnchorWidth = unchecked((Byte)(-1)); n.ChordId = -1; n.ChordNotesId = -1; n.PhraseIterationId = getPhraseIterationId(xml, n.Time, false); n.PhraseId = xml.PhraseIterations[n.PhraseIterationId].PhraseId; // these will be overwritten n.FingerPrintId[0] = -1; n.FingerPrintId[1] = -1; // these will be overwritten n.NextIterNote = -1; n.PrevIterNote = -1; n.ParentPrevNote = -1; n.SlideTo = unchecked((Byte)note.SlideTo); n.SlideUnpitchTo = unchecked((Byte)note.SlideUnpitchTo); n.LeftHand = unchecked((Byte)note.LeftHand); // 'bvibrato' and 'rchords8' are using 0 value but without TAP mask if (note.Tap != 0) n.Tap = unchecked((Byte)note.Tap); else n.Tap = unchecked((Byte)(-1)); n.PickDirection = (Byte)note.PickDirection; n.Slap = (Byte)note.Slap; n.Pluck = (Byte)note.Pluck; n.Vibrato = note.Vibrato; n.Sustain = note.Sustain; n.MaxBend = note.Bend; n.BendData = new BendDataSection(); n.BendData.BendData = parseBendData(note, true); n.BendData.Count = n.BendData.BendData.Length; }
internal static SongNote2014[] Parse(Sng2014HSL.NotesSection notesSection) { var notes = new List<SongNote2014>(); for (var i = 0; i < notesSection.Count; i++) { if (notesSection.Notes[i].ChordId != -1) continue; //Skip chord notes (get only single notes) var note = new SongNote2014(); // BASIC INFO note.Time = notesSection.Notes[i].Time; note.Fret = (sbyte)notesSection.Notes[i].FretId; note.String = notesSection.Notes[i].StringIndex; // TECHNIQUES note.PickDirection = notesSection.Notes[i].PickDirection; note.parseNoteMask(notesSection.Notes[i].NoteMask); //NOTE MASK need to be setup previous get property values // Techniques with own properties if (notesSection.Notes[i].LeftHand != 255) note.LeftHand = (sbyte)notesSection.Notes[i].LeftHand; if (notesSection.Notes[i].SlideTo != 255) note.SlideTo = (sbyte)notesSection.Notes[i].SlideTo; if (notesSection.Notes[i].SlideUnpitchTo != 255) note.SlideUnpitchTo = (sbyte)notesSection.Notes[i].SlideUnpitchTo; if (notesSection.Notes[i].Tap != 255) note.Tap = notesSection.Notes[i].Tap; if (notesSection.Notes[i].Slap != 255) note.Slap = (sbyte)notesSection.Notes[i].Slap; if (notesSection.Notes[i].Pluck != 255) note.Pluck = (sbyte)notesSection.Notes[i].Pluck; if (notesSection.Notes[i].Vibrato != 0) note.Vibrato = notesSection.Notes[i].Vibrato; if (notesSection.Notes[i].Sustain != 0) note.Sustain = notesSection.Notes[i].Sustain; if (notesSection.Notes[i].MaxBend != 0) note.Bend = (byte)notesSection.Notes[i].MaxBend; note.BendValues = BendValue.Parse(notesSection.Notes[i].BendData.BendData); notes.Add(note); } return notes.ToArray(); }
private UInt32 parseNoteMask(SongNote2014 note, bool single) { if (note == null) return CON.NOTE_MASK_UNDEFINED; // single note UInt32 mask = 0; if (single) mask |= CON.NOTE_MASK_SINGLE; if (note.Fret == 0) mask |= CON.NOTE_MASK_OPEN; if (note.LinkNext != 0) mask |= CON.NOTE_MASK_PARENT; if (note.Accent != 0) mask |= CON.NOTE_MASK_ACCENT; if (note.Bend != 0) mask |= CON.NOTE_MASK_BEND; if (note.HammerOn != 0) mask |= CON.NOTE_MASK_HAMMERON; if (note.Harmonic != 0) mask |= CON.NOTE_MASK_HARMONIC; // TODO: seems to have no effect // hopo = 0 if (single && note.Ignore != 0) mask |= CON.NOTE_MASK_IGNORE; if (single && note.LeftHand != -1) mask |= CON.NOTE_MASK_LEFTHAND; if (note.Mute != 0) mask |= CON.NOTE_MASK_MUTE; if (note.PalmMute != 0) mask |= CON.NOTE_MASK_PALMMUTE; if (note.Pluck != -1) mask |= CON.NOTE_MASK_PLUCK; if (note.PullOff != 0) mask |= CON.NOTE_MASK_PULLOFF; if (note.Slap != -1) mask |= CON.NOTE_MASK_SLAP; if (note.SlideTo != -1) mask |= CON.NOTE_MASK_SLIDE; if (note.Sustain != 0) mask |= CON.NOTE_MASK_SUSTAIN; if (note.Tremolo != 0) mask |= CON.NOTE_MASK_TREMOLO; if (note.HarmonicPinch != 0) mask |= CON.NOTE_MASK_PINCHHARMONIC; // TODO: seems to have no effect // pickDirection = 0 if (note.RightHand != -1) mask |= CON.NOTE_MASK_RIGHTHAND; if (note.SlideUnpitchTo != -1) mask |= CON.NOTE_MASK_SLIDEUNPITCHEDTO; if (note.Tap != 0) mask |= CON.NOTE_MASK_TAP; if (note.Vibrato != 0) mask |= CON.NOTE_MASK_VIBRATO; return mask; }
private BendData32[] parseBendData(SongNote2014 note, bool single) { // single can be any size, otherwise 32x BendData32 are allocated Int32 count = 32; // count of available values Int32 bend_values = 0; if (note != null && note.BendValues != null) bend_values = note.BendValues.Length; if (single) { count = bend_values; } var bd = new BendData32[count]; for (int i = 0; i < count; i++) bd[i] = new BendData32(); // intentionally not using "count" for (int i = 0; i < bend_values; i++) { var b = bd[i]; b.Time = note.BendValues[i].Time; b.Step = note.BendValues[i].Step; // these are always zero for lessons and songs //"Unk3_0", //"Unk4_0", // TODO unknown meaning, added attribute to XML for testing //"Unk5" b.Unk5 = note.BendValues[i].Unk5; } return bd; }
private static SongNote2014 GetNote(ZpeChord chord, ZpeChord nextChord, int zNoteIndex = 0) { SongNote2014 note = new SongNote2014(); ZpeNote zNote = chord.Notes[zNoteIndex]; note.Fret = (sbyte)zNote.Fret; note.String = (byte)zNote.StringNo; note.Time = (float)chord.StartTime; note.Accent = 0; note.Bend = 0; note.HammerOn = (zNote.IsTapNote || chord.IsHammerOn) ? (byte)1 : (byte)0; note.Harmonic = 0; note.HarmonicPinch = 0; note.Hopo = note.HammerOn; note.Ignore = 0; note.LinkNext = 0; note.LeftHand = -1; note.Mute = 0; note.PalmMute = (zNote.IsXNote || chord.IsMute) ? (byte)1 : (byte)0; note.Pluck = -1; note.PullOff = 0; note.RightHand = -1; note.Slap = -1; note.SlideUnpitchTo = -1; note.Sustain = (chord.EndTime - chord.StartTime > .5) ? chord.EndTime - chord.StartTime : 0; note.Tap = 0; note.Tremolo = 0; note.Vibrato = 0; if (chord.IsSlide && nextChord != null) { note.SlideTo = (sbyte)Math.Max(nextChord.Notes[0].Fret, 1); note.Sustain = chord.EndTime - chord.StartTime; note.HammerOn = note.Hopo = note.PalmMute = 0; } else note.SlideTo = -1; //// no advanced techniques for now //note.SlideTo = -1; //note.Sustain = 0; //note.PalmMute = 0; //note.HammerOn = 0; //note.Hopo = 0; return note; }
static List<int> getNoteTech(SongNote2014 n) { // TODO: adjust these values var t = new List<int>(); if (1 == n.Accent) t.Add(0); if (0 != n.Bend) t.Add(1); if (1 == n.Mute) t.Add(2); if (1 == n.HammerOn) t.Add(3); if (1 == n.Harmonic) t.Add(4); if (1 == n.HarmonicPinch) t.Add(5); if (1 == n.Hopo) t.Add(6); if (1 == n.PalmMute) t.Add(7); if (1 == n.Pluck) t.Add(8); if (1 == n.PullOff) t.Add(9); if (1 == n.Slap) t.Add(10); if (n.SlideTo > 0) t.Add(11); if (n.SlideUnpitchTo > 0) t.Add(12); if (n.Sustain > 0) t.Add(13); if (1 == n.Tap) t.Add(14); if (1 == n.Tremolo) t.Add(15); if (1 == n.Vibrato) t.Add(16); // TODO: determine other dependencies return t; }
static Chord CreateChord(SongNote2014 note, int capo) { var chord = new Chord(); chord.Start = note.Time; var convertedNote = CreateNote(note, capo); chord.Notes.Add(note.String, convertedNote); chord.Tremolo = convertedNote.Tremolo; chord.Slapped = convertedNote.Slapped; chord.Popped = convertedNote.Popped; return chord; }
static Note CreateNote(SongNote2014 rsNote, int capo) { var note = new Note() { Start = rsNote.Time, String = rsNote.String, Fret = rsNote.Fret, PalmMuted = rsNote.PalmMute != 0, Muted = rsNote.Mute != 0, Hopo = rsNote.HammerOn != 0 || rsNote.PullOff != 0, Vibrato = rsNote.Vibrato > 0, LinkNext = rsNote.LinkNext != 0, Accent = rsNote.Accent != 0, Harmonic = rsNote.Harmonic != 0, PinchHarmonic = rsNote.HarmonicPinch != 0, Tremolo = rsNote.Tremolo != 0, Tapped = rsNote.Tap != 0, Slapped = rsNote.Slap == 1, Popped = rsNote.Pluck == 1, LeftFingering = rsNote.LeftHand, RightFingering = rsNote.RightHand, Sustain = rsNote.Sustain }; if (rsNote.SlideTo != -1) { note.Slide = Note.SlideType.ToNext; note.SlideTarget = rsNote.SlideTo; } else if (rsNote.SlideUnpitchTo != -1) { if (rsNote.SlideUnpitchTo > rsNote.Fret) note.Slide = Note.SlideType.UnpitchUp; else note.Slide = Note.SlideType.UnpitchDown; } if (rsNote.BendValues != null) { foreach (var val in rsNote.BendValues) { note.BendValues.Add(new Note.BendValue() { Start = val.Time, Step = val.Step }); } note.BendValues = note.BendValues.OrderBy(x => x.Start).ToList(); } // adjust for capo if (note.Fret > 0) note.Fret -= capo; return note; }
private static void AddBeatAndNoteToVoice(Voice voice, SongNote2014 note, Duration duration, Single durationTime) { var beat = new Beat(); beat.Duration = duration; voice.AddBeat(beat); if (note != null) { var destNote = NoteFromNote(note, durationTime); beat.AddNote(destNote); if (note.HammerOn == 1 && _prevConvertedNote != null) { _prevConvertedNote.IsHammerPullOrigin = true; //_prevConvertedNote.slideTarget = destNote; //_prevConvertedNote.slideType = SlideType.Shift; destNote.IsHammerPullOrigin = false; destNote.IsGhost = true; //_prevConvertedNote.hammerPullOrigin = destNote;// _prevConvertedNote; destNote.HammerPullOrigin = _prevConvertedNote; } _prevConvertedNote = destNote; } }
public SongNoteChordWrapper(SongNote2014 wrappedObject) { _wrappedObject = wrappedObject; Time = wrappedObject.Time; }
private static Note NoteFromNote(SongNote2014 srcNote, Single durationTime) { //DbgAssert(srcNote.LinkNext == 0); //DbgAssert(srcNote.Bend == 0); //DbgAssert(srcNote.HammerOn == 0); //DbgAssert(srcNote.Harmonic == 0); //DbgAssert(srcNote.Hopo == 0); //DbgAssert(srcNote.Ignore == 0); //DbgAssert(srcNote.Mute == 0); //DbgAssert(srcNote.PalmMute == 0); //DbgAssert(srcNote.Pluck == -1); //DbgAssert(srcNote.PullOff == 0); //DbgAssert(srcNote.Slap == -1); //DbgAssert(srcNote.Tremolo == 0); //DbgAssert(srcNote.HarmonicPinch == 0); //DbgAssert(srcNote.PickDirection == 0); //DbgAssert(srcNote.Tap == 0); //DbgAssert(srcNote.Vibrato == 0); var note1 = new Note(); note1.Fret = srcNote.Fret; note1.String = srcNote.String + 1; note1.Accentuated = srcNote.Accent == 1 ? AccentuationType.Normal : AccentuationType.None; if (srcNote.BendValues != null ) { foreach(var srcBend in srcNote.BendValues) { var bp = new BendPoint(); var srcBendOffset = srcBend.Time - srcNote.Time; bp.Offset = (int)Math.Round((srcBendOffset / durationTime) * 60); bp.Value = (int)(srcBend.Step * 4); note1.BendPoints.Insert(note1.BendPoints.Count, bp); //note1.bendPoints.insert } if (note1.BendPoints.Count > 0) { var lastbp = note1.BendPoints[note1.BendPoints.Count-1] as BendPoint; if (lastbp.Offset < 60) { var bp = new BendPoint(); bp.Offset = 60; bp.Value = lastbp.Value; note1.BendPoints.Insert(note1.BendPoints.Count, bp); } var firstBp = note1.BendPoints[0] as BendPoint; if (firstBp.Offset > 0) { var bp = new BendPoint(); bp.Offset = 0; bp.Value = 0; note1.BendPoints.Insert(0, bp); } } } if (srcNote.SlideTo > -1) note1.SlideType = SlideType.Shift; if (srcNote.SlideUnpitchTo > -1) { if (srcNote.SlideUnpitchTo > srcNote.Fret) note1.SlideType = SlideType.OutUp; else note1.SlideType = SlideType.OutDown; } //note1.bendPoints //src.bend //note1.durationPercent //note1.hammerPullOrigin //note1.harmonicType=HarmonicType.Natural //note1.harmonicValue //note1.isDead //note1.isFingering //note1.isGhost //note1.isHammerPullDestination //note1.isHammerPullOrigin //note1.isLetRing //note1.isPalmMute //note1.isStaccato //note1.isTieDestination //note1.isTieOrigin //note1.leftHandFinger //note1.octave //note1.slideTarget //note1.slideType=SlideType.IntoFromAbove //note1.tieOrigin //note1.trillSpeed //note1.trillValue //note1.vibrato return note1; }
private static Note NoteFromNote(SongNote2014 srcNote) { //DbgAssert(srcNote.LinkNext == 0); //DbgAssert(srcNote.Bend == 0); //DbgAssert(srcNote.HammerOn == 0); //DbgAssert(srcNote.Harmonic == 0); //DbgAssert(srcNote.Hopo == 0); //DbgAssert(srcNote.Ignore == 0); //DbgAssert(srcNote.Mute == 0); //DbgAssert(srcNote.PalmMute == 0); //DbgAssert(srcNote.Pluck == -1); //DbgAssert(srcNote.PullOff == 0); //DbgAssert(srcNote.Slap == -1); //DbgAssert(srcNote.Tremolo == 0); //DbgAssert(srcNote.HarmonicPinch == 0); //DbgAssert(srcNote.PickDirection == 0); //DbgAssert(srcNote.Tap == 0); //DbgAssert(srcNote.Vibrato == 0); var note1 = new Note(); note1.fret = srcNote.Fret; note1.@string = srcNote.String + 1; note1.accentuated = srcNote.Accent == 1 ? AccentuationType.Normal : AccentuationType.None; if (srcNote.SlideTo > -1) note1.slideType = SlideType.Shift; if (srcNote.SlideUnpitchTo > -1) { if (srcNote.SlideUnpitchTo > srcNote.Fret) note1.slideType = SlideType.OutUp; else note1.slideType = SlideType.OutDown; } //note1.bendPoints src.bend //note1.durationPercent //note1.hammerPullOrigin //note1.harmonicType=HarmonicType.Natural //note1.harmonicValue //note1.isDead //note1.isFingering //note1.isGhost //note1.isHammerPullDestination //note1.isHammerPullOrigin //note1.isLetRing //note1.isPalmMute //note1.isStaccato //note1.isTieDestination //note1.isTieOrigin //note1.leftHandFinger //note1.octave //note1.slideTarget //note1.slideType=SlideType.IntoFromAbove //note1.tieOrigin //note1.trillSpeed //note1.trillValue //note1.vibrato return note1; }
internal static SongNote2014[] Parse(Sng2014HSL.NotesSection notesSection) { var notes = new List <SongNote2014>(); for (var i = 0; i < notesSection.Count; i++) { if (notesSection.Notes[i].ChordId != -1) { continue; //Skip chord notes (get only single notes) } var note = new SongNote2014(); // BASIC INFO note.Time = notesSection.Notes[i].Time; note.Fret = (sbyte)notesSection.Notes[i].FretId; note.String = notesSection.Notes[i].StringIndex; // TECHNIQUES note.PickDirection = notesSection.Notes[i].PickDirection; note.parseNoteMask(notesSection.Notes[i].NoteMask); //NOTE MASK need to be setup previous get property values // Techniques with own properties if (notesSection.Notes[i].LeftHand != 255) { note.LeftHand = (sbyte)notesSection.Notes[i].LeftHand; } if (notesSection.Notes[i].SlideTo != 255) { note.SlideTo = (sbyte)notesSection.Notes[i].SlideTo; } if (notesSection.Notes[i].SlideUnpitchTo != 255) { note.SlideUnpitchTo = (sbyte)notesSection.Notes[i].SlideUnpitchTo; } if (notesSection.Notes[i].Tap != 255) { note.Tap = notesSection.Notes[i].Tap; } if (notesSection.Notes[i].Slap != 255) { note.Slap = (sbyte)notesSection.Notes[i].Slap; } if (notesSection.Notes[i].Pluck != 255) { note.Pluck = (sbyte)notesSection.Notes[i].Pluck; } if (notesSection.Notes[i].Vibrato != 0) { note.Vibrato = notesSection.Notes[i].Vibrato; } if (notesSection.Notes[i].Sustain != 0) { note.Sustain = notesSection.Notes[i].Sustain; } if (notesSection.Notes[i].MaxBend != 0) { note.Bend = notesSection.Notes[i].MaxBend; } note.BendValues = BendValue.Parse(notesSection.Notes[i].BendData.BendData); notes.Add(note); } return(notes.ToArray()); }