public GuitarModifier(GuitarMessageList owner, TickPair ticks, GuitarModifierType type, GuitarMessageType mt) : base(owner, ticks, mt) { Data2 = 100; Channel = 0; this.ModifierType = type; }
public GuitarMessage(GuitarMessageList owner, TickPair pair, GuitarMessageType type) { this.messageType = type; this.props = new MidiEventProps(owner, pair); this.SetTicks(pair); }
public GuitarNote(GuitarMessageList owner, TickPair ticks) : base(owner, ticks, GuitarMessageType.GuitarNote) { Data2 = Utility.Data2Default; Channel = Utility.ChannelDefault; SetTicks(ticks); }
public GuitarBigRockEnding(GuitarMessageList owner, TickPair ticks, IEnumerable <MidiEventPair> events) : this(owner, ticks) { Channel = 0; events.ToList().ForEach(ev => AddSubMessage(new GuitarBigRockEndingSubMessage(this, ev))); SetTicks(ticks); }
public override string ToString() { return(TickPair.ToString() + " " + MessageType.ToString() + (IsDeleted ? " (Deleted)" : "") + (IsNew ? " (New)" : "") + (!HasDownEvent ? " (no down)" : "") + (!HasUpEvent ? " (no up)" : "")); }
public static GuitarChordName CreateEvent(GuitarMessageList owner, TickPair ticks, ChordNameMeta meta, bool chordNameHidden) { var ret = new GuitarChordName(owner, ticks, meta, chordNameHidden); ret.IsNew = true; ret.CreateEvents(); return(ret); }
public GuitarChordName(GuitarMessageList owner, TickPair pair, ChordNameMeta meta, bool hidden) : base(owner, pair, GuitarMessageType.GuitarChordName) { this.Data1 = meta.ToneName.ToToneNameData1().ToInt(); this.Meta = meta; this.ChordNameHidden = hidden; Channel = 0; }
public GuitarPowerup(GuitarMessageList owner, TickPair pair) : base(owner, pair, GuitarModifierType.Powerup, GuitarMessageType.GuitarPowerup) { this.Data1 = Utility.PowerupData1; this.Data2 = 100; Channel = 0; this.SetTicks(pair); }
public GuitarHandPosition(GuitarMessageList owner, TickPair pair, int noteFret) : base(owner, pair, GuitarMessageType.GuitarHandPosition) { this.Data1 = Utility.HandPositionData1; NoteFretDown = noteFret; Channel = 0; this.SetTicks(pair); }
public GuitarMultiStringTremelo(GuitarMessageList owner, TickPair pair) : base(owner, pair, GuitarModifierType.MultiStringTremelo, GuitarMessageType.GuitarMultiStringTremelo) { this.Data1 = Utility.MultiStringTremeloData1; this.Data2 = 100; Channel = 0; this.SetTicks(pair); }
public GuitarSingleStringTremelo(GuitarMessageList owner, TickPair ticks) : base(owner, ticks, GuitarModifierType.SingleStringTremelo, GuitarMessageType.GuitarSingleStringTremelo) { this.Data1 = Utility.SingleStringTremeloData1; this.Data2 = 100; Channel = 0; this.SetTicks(ticks); }
public override void SetTicks(TickPair ticks) { Start.IfObjectNotNull(n => n.SetDownTick(ticks.Down)); End.IfObjectNotNull(n => n.SetDownTick(ticks.Up)); Norm.IfObjectNotNull(n => n.SetDownTick(GetNormTick(ticks))); base.SetTicks(ticks); }
public static GuitarHandPosition CreateEvent(GuitarMessageList owner, TickPair ticks, int noteFret) { var ret = new GuitarHandPosition(owner, ticks, noteFret); ret.IsNew = true; ret.CreateEvents(); return(ret); }
public virtual bool IsDownEventClose(GuitarMessage m2) { if (DownTick.IsNull() || m2.DownTick.IsNull()) { return(false); } return(TickPair.IsCloseDownDown(m2.TickPair)); }
public GuitarBigRockEndingSubMessage(GuitarBigRockEnding owner, TickPair ticks, int data1) : base(owner.Owner, ticks, GuitarMessageType.GuitarBigRockEndingSubMessage) { Channel = 0; this.Data1 = data1; this.Data2 = 100; this.owner = owner; this.SetTicks(ticks); }
public virtual bool IsUpEventClose(GuitarMessage m2) { if (UpTick.IsNull() || m2.UpTick.IsNull()) { return(false); } return(TickPair.IsCloseUpUp(m2.TickPair)); }
public static GuitarPowerup CreatePowerup(GuitarMessageList owner, TickPair ticks) { var ret = new GuitarPowerup(owner, ticks); ret.IsNew = true; ret.CreateEvents(); return(ret); }
public static GuitarChord GetChord(GuitarMessageList owner, GuitarDifficulty difficulty, TickPair ticks, GuitarChordConfig config) { GuitarChord ret = null; var lowE = Utility.GetStringLowE(difficulty); var notes = new List <GuitarNote>(); for (int x = 0; x < config.Frets.Length; x++) { var fret = config.Frets[x]; var channel = config.Channels[x]; if (!fret.IsNull() && fret >= 0 && fret <= 23) { var note = GuitarNote.GetNote(owner, difficulty, ticks, x, fret, channel == Utility.ChannelTap, channel == Utility.ChannelArpeggio, channel == Utility.ChannelX); if (note != null && note.NoteFretDown.IsNotNull() && note.NoteString.IsNotNull()) { notes.Add(note); } else { } } } if (notes.Any()) { ret = new GuitarChord(owner, ticks, difficulty, notes); ret.chordConfig = config.Clone(); if (ret != null) { if (config.IsSlide || config.IsSlideReverse) { ret.AddSlide(config.IsSlideReverse, false); } if (config.IsHammeron) { ret.AddHammeron(false); } ret.AddStrum(config.StrumMode, false); } } return(ret); }
public GuitarBigRockEnding(GuitarMessageList owner, TickPair ticks) : base(owner, ticks, GuitarModifierType.BigRockEnding, GuitarMessageType.GuitarBigRockEnding) { Channel = 0; foreach (var data1 in Utility.GetBigRockEndingData1(IsPro)) { childEvents.Add(new GuitarBigRockEndingSubMessage(this, ticks, data1)); } SetTicks(ticks); }
public MidiEventPair Insert(int data1, int data2, int channel, TickPair ticks) { if (!ticks.IsValid) { return(default(MidiEventPair)); } var down = Insert(ticks.Down, new ChannelMessage(ChannelCommand.NoteOn, data1, data2, channel)); var up = Insert(ticks.Up, new ChannelMessage(ChannelCommand.NoteOff, data1, 0, channel)); return(new MidiEventPair(Messages, down, up)); }
public AdjustResult AdjustChordTicks(GuitarChord chord, TickPair newTicks, AdjustOption option) { AdjustResult result; var updatedTicks = GetAdjustChordTicks(newTicks, option, out result, chord); if (!result.HasFlag(AdjustResult.Error) && updatedTicks.IsNull == false) { chord.SetTicks(updatedTicks); chord.UpdateEvents(); } return(result); }
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())))); }
public override void SetTicks(TickPair ticks) { base.SetTicks(ticks); if (Notes != null) { Notes.ForEach(x => x.SetTicks(ticks)); } if (Modifiers != null) { Modifiers.ForEach(x => x.SetTicks(ticks)); } }
public IEnumerable <GuitarModifier> GetModifiersBetweenTick(TickPair pair) { var ret = new List <GuitarModifier>(); ret.AddRange(Arpeggios.GetBetweenTick(pair)); ret.AddRange(BigRockEndings.GetBetweenTick(pair)); ret.AddRange(Powerups.GetBetweenTick(pair)); ret.AddRange(Solos.GetBetweenTick(pair)); ret.AddRange(MultiStringTremelos.GetBetweenTick(pair)); ret.AddRange(SingleStringTremelos.GetBetweenTick(pair)); return(ret.ToList()); }
public static GuitarArpeggio CreateArpeggio(GuitarMessageList owner, TickPair ticks, GuitarDifficulty difficulty) { GuitarArpeggio ret = null; if (Utility.GetArpeggioData1(difficulty).IsNotNull()) { ret = new GuitarArpeggio(owner, ticks, difficulty); if (ret != null) { ret.IsNew = true; ret.CreateEvents(); } } return(ret); }
public GuitarTrainer(GuitarMessageList owner, TickPair ticks, GuitarTrainerType type, GuitarTextEvent start, GuitarTextEvent end, GuitarTextEvent norm) : base(owner, ticks, GuitarMessageType.GuitarTrainer) { this.TrainerType = type; Start = start; End = end; Norm = norm; this.TrainerIndex = ParseTrainerIndex(); this.Loopable = norm != null; SetTicks(ticks); }
public GuitarTrainer(GuitarMessageList owner, TickPair ticks, GuitarTrainerType type, bool loopable, int index = Int32.MinValue) : base(owner, ticks, GuitarMessageType.GuitarTrainer) { this.TrainerType = type; this.TrainerIndex = index.IsNull() ? (owner.Trainers.Where(x => x.TrainerType == type).Count() + 1) : index; this.Loopable = loopable; Start = new GuitarTextEvent(owner, ticks.Down, GetStartText(TrainerType, TrainerIndex)); End = new GuitarTextEvent(owner, ticks.Up, GetEndText(TrainerType, TrainerIndex)); if (Loopable) { Norm = new GuitarTextEvent(owner, GetNormTick(ticks), GetNormText(TrainerType, TrainerIndex, Loopable)); } SetTicks(ticks); }
public GuitarChord(GuitarMessageList owner, TickPair pair, GuitarDifficulty difficulty, IEnumerable <GuitarNote> notes) : base(owner, pair, GuitarMessageType.GuitarChord) { Notes = new GuitarChordNoteList(this); Modifiers = new List <ChordModifier>(); ChordNameEvents = new GuitarChordNameList(this); Notes.SetNotes(notes); SetTicks(pair); chordConfig = new GuitarChordConfig() { Frets = this.NoteFrets.ToArray(), Channels = this.NoteChannels.ToArray(), IsHammeron = this.HasHammeron, IsSlide = this.HasSlide, IsSlideReverse = this.HasSlideReversed, StrumMode = this.StrumMode, }; }
public static GuitarNote GetNotePro(GuitarMessageList owner, GuitarDifficulty diff, TickPair ticks, int noteString, int noteFret, bool isTap, bool isArpeggio, bool isX) { var ret = new GuitarNote(owner, ticks); ret.Data1 = Utility.GetNoteData1(noteString, diff, true); ret.NoteFretDown = noteFret; if (isX) { ret.Channel = Utility.ChannelX; } else if (isArpeggio) { ret.Channel = Utility.ChannelArpeggio; } else if (isTap) { ret.Channel = Utility.ChannelTap; } return(ret); }
public GuitarArpeggio(GuitarMessageList owner, TickPair ticks, GuitarDifficulty difficulty) : base(owner, ticks, GuitarModifierType.Arpeggio, GuitarMessageType.GuitarArpeggio) { Data1 = Utility.GetArpeggioData1(difficulty); }