Exemple #1
0
 public GuitarChord CloneAtTime(
     GuitarMessageList owner,
     TickPair ticks,
     int stringOffset = int.MinValue)
 {
     return(GuitarChord.CreateChord(owner, owner.Owner.CurrentDifficulty,
                                    owner.Owner.SnapLeftRightTicks(ticks, new SnapConfig(true, true, true)),
                                    new GuitarChordConfig(Notes.GetFretsAtStringOffset(stringOffset.GetIfNull(0)),
                                                          Notes.GetChannelsAtStringOffset(stringOffset.GetIfNull(0)),
                                                          HasSlide, HasSlideReversed, HasHammeron, StrumMode,
                                                          RootNoteConfig.GetIfNotNull(x => x.Clone()))));
 }
Exemple #2
0
        public SerializedChord Serialize()
        {
            var ret = new SerializedChord();

            ret.TickLength = TickLength;
            ret.TimeLength = TimeLength;

            ret.Notes.AddRange(Notes.Select(x => new SerializedChordNote()
            {
                Fret = x.NoteFretDown, String = x.NoteString, Channel = x.Channel
            }));
            ret.Modifiers.AddRange(Modifiers.Select(x => new SerializedChordModifier()
            {
                Type = (int)x.ModifierType
            }));
            ret.RootNoteConfig = RootNoteConfig.GetIfNotNull(x => x.Clone());
            GetTunedChordNames(null).ForEach(x =>
                                             ret.Names.Add(x));
            return(ret);
        }