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);
            }
        }
Example #2
0
        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);
            }
        }
Example #3
0
        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);
            }
        }