protected override void CreateTies(Note n) { // create a tie if any effect requires it // NOTE: we create 2 tie glyphs if we have a line break inbetween // the two notes if (n.IsTieOrigin) { var tie = new ScoreTieGlyph(n, n.TieDestination); Ties.Add(tie); } if (n.IsTieDestination) { var tie = new ScoreTieGlyph(n.TieOrigin, n, true); Ties.Add(tie); } else if (n.IsHammerPullOrigin) { // only create tie for very first origin of "group" if (n.HammerPullOrigin == null) { // tie with end note Note destination = n.HammerPullDestination; while (destination.HammerPullDestination != null) { destination = destination.HammerPullDestination; } var tie = new ScoreTieGlyph(n, destination); Ties.Add(tie); } } else if (n.IsHammerPullDestination) { // only create tie for last destination of "group" // NOTE: HOPOs over more than 2 staffs does not work with this mechanism, but this sounds unrealistic if (n.HammerPullDestination == null) { Note origin = n.HammerPullOrigin; while (origin.HammerPullOrigin != null) { origin = origin.HammerPullOrigin; } var tie = new ScoreTieGlyph(origin, n, true); Ties.Add(tie); } } else if (n.SlideType == SlideType.Legato) { var tie = new ScoreTieGlyph(n, n.SlideTarget); Ties.Add(tie); } // TODO: depending on the type we have other positioning // we should place glyphs in the preNotesGlyph or postNotesGlyph if needed if (n.SlideType != SlideType.None) { var l = new ScoreSlideLineGlyph(n.SlideType, n, this); Ties.Add(l); } }
protected override void CreateTies(Note n) { // create a tie if any effect requires it // NOTE: we create 2 tie glyphs if we have a line break inbetween // the two notes if (n.IsTieOrigin) { var tie = new ScoreTieGlyph(n, n.TieDestination, this); Ties.Add(tie); } if (n.IsTieDestination) { var tie = new ScoreTieGlyph(n.TieOrigin, n, this, true); Ties.Add(tie); } else if (n.IsHammerPullOrigin) { var tie = new ScoreTieGlyph(n, n.HammerPullDestination, this); Ties.Add(tie); } else if (n.SlideType == SlideType.Legato) { var tie = new ScoreTieGlyph(n, n.SlideTarget, this); Ties.Add(tie); } // TODO: depending on the type we have other positioning // we should place glyphs in the preNotesGlyph or postNotesGlyph if needed if (n.SlideType != SlideType.None) { var l = new ScoreSlideLineGlyph(n.SlideType, n, this); Ties.Add(l); } }
public override void DoLayout() { base.DoLayout(); if (Beat.IsLegatoOrigin) { // only create slur for very first origin of "group" if (Beat.PreviousBeat == null || !Beat.PreviousBeat.IsLegatoOrigin) { // tie with end beat Beat destination = Beat.NextBeat; while (destination.NextBeat != null && destination.NextBeat.IsLegatoDestination) { destination = destination.NextBeat; } Ties.Add(new ScoreLegatoGlyph(Beat, destination)); } } else if (Beat.IsLegatoDestination) { // only create slur for last destination of "group" if (!Beat.IsLegatoOrigin) { Beat origin = Beat.PreviousBeat; while (origin.PreviousBeat != null && origin.PreviousBeat.IsLegatoOrigin) { origin = origin.PreviousBeat; } Ties.Add(new ScoreLegatoGlyph(origin, Beat, true)); } } }
public int CompareTo(Fitness that) { if (ReferenceEquals(this, that)) { return(0); } if (that is null) { return(1); } if (Math.Abs(PercentLosses - that.PercentLosses) > 0.1) { return(-PercentLosses.CompareTo(that.PercentLosses)); } if (Losses > 0) { return(0); } if (Ties != that.Ties) { return(-Ties.CompareTo(that.Ties)); } return(-GeneCount.CompareTo(that.GeneCount)); }
protected override void CreateTies(Note n) { var renderer = (TabBarRenderer)Renderer; if (n.IsTieOrigin && renderer.ShowTiedNotes) { var tie = new TabTieGlyph(n, n.TieDestination, false); Ties.Add(tie); } if (n.IsTieDestination && renderer.ShowTiedNotes) { var tie = new TabTieGlyph(n.TieOrigin, n, false, true); Ties.Add(tie); } else if (n.IsHammerPullOrigin) { // only create tie for very first origin of "group" if (n.HammerPullOrigin == null) { // tie with end note Note destination = n.HammerPullDestination; while (destination.HammerPullDestination != null) { destination = destination.HammerPullDestination; } var tie = new TabTieGlyph(n, destination, false); Ties.Add(tie); } } else if (n.IsHammerPullDestination) { // only create tie for last destination of "group" // NOTE: HOPOs over more than 2 staffs does not work with this mechanism, but this sounds unrealistic if (n.HammerPullDestination == null) { Note origin = n.HammerPullOrigin; while (origin.HammerPullOrigin != null) { origin = origin.HammerPullOrigin; } var tie = new TabTieGlyph(origin, n, false, true); Ties.Add(tie); } } else if (n.SlideType == SlideType.Legato) { var tie = new TabTieGlyph(n, n.SlideTarget, true, false); Ties.Add(tie); } if (n.SlideType != SlideType.None) { var l = new TabSlideLineGlyph(n.SlideType, n, this); Ties.Add(l); } }
protected override void CreateTies(Note n) { // create a tie if any effect requires it if (!n.IsVisible) { return; } // NOTE: we create 2 tie glyphs if we have a line break inbetween // the two notes if (n.IsTieOrigin && !n.HasBend && !n.Beat.HasWhammyBar && n.Beat.GraceType != GraceType.BendGrace && n.TieDestination.IsVisible) { var tie = new ScoreTieGlyph(n, n.TieDestination); Ties.Add(tie); } if (n.IsTieDestination && !n.TieOrigin.HasBend && !n.Beat.HasWhammyBar) { var tie = new ScoreTieGlyph(n.TieOrigin, n, true); Ties.Add(tie); } // TODO: depending on the type we have other positioning // we should place glyphs in the preNotesGlyph or postNotesGlyph if needed if (n.SlideType != SlideType.None) { var l = new ScoreSlideLineGlyph(n.SlideType, n, this); Ties.Add(l); } if (n.Beat.SlurOrigin != null && n.Index == 0) { var tie = new ScoreSlurGlyph(n.Beat); Ties.Add(tie); } if (n.HasBend) { if (_bend == null) { _bend = new ScoreBendGlyph(n.Beat); _bend.Renderer = Renderer; Ties.Add(_bend); } _bend.AddBends(n); } }
protected override void CreateTies(Note n) { if (n.IsHammerPullOrigin) { var tie = new TabTieGlyph(n, n.HammerPullDestination, this); Ties.Add(tie); } else if (n.SlideType == SlideType.Legato) { var tie = new TabTieGlyph(n, n.SlideTarget, this); Ties.Add(tie); } if (n.SlideType != SlideType.None) { var l = new TabSlideLineGlyph(n.SlideType, n, this); Ties.Add(l); } }
protected override void CreateTies(Note n) { if (!n.IsVisible) { return; } var renderer = (TabBarRenderer)Renderer; if (n.IsTieOrigin && renderer.ShowTiedNotes && n.TieDestination.IsVisible) { var tie = new TabTieGlyph(n, n.TieDestination, false); Ties.Add(tie); } if (n.IsTieDestination && renderer.ShowTiedNotes) { var tie = new TabTieGlyph(n.TieOrigin, n, false, true); Ties.Add(tie); } if (n.SlurOrigin != null) { var tie = new TabSlurGlyph(n); Ties.Add(tie); } if (n.SlideType != SlideType.None) { var l = new TabSlideLineGlyph(n.SlideType, n, this); Ties.Add(l); } if (n.HasBend) { if (_bend == null) { _bend = new TabBendGlyph(n.Beat); _bend.Renderer = Renderer; Ties.Add(_bend); } _bend.AddBends(n); } }