当前位置: 首页>>代码示例>>C#>>正文


C# Model.Note类代码示例

本文整理汇总了C#中AlphaTab.Model.Note的典型用法代码示例。如果您正苦于以下问题:C# Note类的具体用法?C# Note怎么用?C# Note使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Note类属于AlphaTab.Model命名空间,在下文中一共展示了Note类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BendGlyph

 public BendGlyph(Note n, float width, float bendValueHeight)
     : base(0, 0)
 {
     _note = n;
     Width = width;
     _bendValueHeight = bendValueHeight;
 }
开发者ID:eriser,项目名称:alphaTab,代码行数:7,代码来源:BendGlyph.cs

示例2: TabSlideLineGlyph

 public TabSlideLineGlyph(SlideType type, Note startNote, BeatContainerGlyph parent)
     : base(0, 0)
 {
     _type = type;
     _startNote = startNote;
     _parent = parent;
 }
开发者ID:eriser,项目名称:alphaTab,代码行数:7,代码来源:TabSlideLineGlyph.cs

示例3: NoteNumberGlyph

        public NoteNumberGlyph(float x, float y, Note n)
            : base(x, y)
        {
            if (!n.IsTieDestination)
            {
                _noteString = n.IsDead ? "x" : n.Fret.ToString();
                if (n.IsGhost)
                {
                    _noteString = "(" + _noteString + ")";
                }
            }
            else if (n.Beat.Index == 0 || n.HasBend)
            {
                _noteString = "(" + n.TieOrigin.Fret + ")";
            }
            else
            {
                _noteString = "";
            }

            if (n.IsTrill)
            {
                _trillNoteString = "(" + n.TrillFret + ")";
            }
            else
            {
                _trillNoteString = "";
            }
        }
开发者ID:CoderLine,项目名称:alphaTab,代码行数:29,代码来源:NoteNumberGlyph.cs

示例4: CreateTies

        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);
            }
        }
开发者ID:CoderLine,项目名称:alphaTab,代码行数:35,代码来源:ScoreBeatContainerGlyph.cs

示例5: BendGlyph

 public BendGlyph(Note n, float width, float height)
     : base(0, 0)
 {
     _note = n;
     Width = width;
     _height = height;
 }
开发者ID:vmoll,项目名称:alphaTab,代码行数:7,代码来源:BendGlyph.cs

示例6: CreateNoteGlyphs

        private void CreateNoteGlyphs(Note n)
        {
            if (n.IsTrill)
            {
                AddGlyph(new SpacingGlyph(0, 0, 4 * Scale));
                var trillNote = new Note();
                trillNote.IsGhost = true;
                trillNote.Fret = n.TrillFret;
                trillNote.String = n.String;
                var tr = (TabBarRenderer)Renderer;
                var trillNumberGlyph = new NoteNumberGlyph(0, 0, trillNote, true);
                var l = n.Beat.Voice.Bar.Track.Tuning.Length - n.String;
                trillNumberGlyph.Y = tr.GetTabY(l);

                AddGlyph(trillNumberGlyph);
            }

            if (n.HasBend)
            {
                var bendValueHeight = 6;
                var bendHeight = n.MaxBendPoint.Value * bendValueHeight;
                Renderer.RegisterOverflowTop(bendHeight);
                AddGlyph(new BendGlyph(n, BeatDurationWidth * Scale, bendValueHeight));
            }
        }
开发者ID:eriser,项目名称:alphaTab,代码行数:25,代码来源:TabBeatPostNotesGlyph.cs

示例7: GetNoteY

 public float GetNoteY(Note note)
 {
     if (_noteLookup.ContainsKey(note.String))
     {
         return Y + _noteLookup[note.String].Y;
     }
     return 0;
 }
开发者ID:eriser,项目名称:alphaTab,代码行数:8,代码来源:TabNoteChordGlyph.cs

示例8: TieGlyph

 public TieGlyph(Note startNote, Note endNote, Glyph parent, bool forEnd)
     : base(0, 0)
 {
     StartNote = startNote;
     EndNote = endNote;
     Parent = parent;
     _forEnd = forEnd;
 }
开发者ID:stefan-j,项目名称:alphaTab,代码行数:8,代码来源:TieGlyph.cs

示例9: GetNoteX

 public override float GetNoteX(Note note, bool onEnd = true)
 {
     var beat = (TabBeatGlyph)GetOnNotesGlyphForBeat(note.Beat);
     if (beat != null)
     {
         return beat.Container.X + beat.X + beat.NoteNumbers.GetNoteX(note, onEnd);
     }
     return 0;
 }
开发者ID:CoderLine,项目名称:alphaTab,代码行数:9,代码来源:TabBarRenderer.cs

示例10: GetNoteX

 public override float GetNoteX(Note note, bool onEnd = true)
 {
     var beat = (TabBeatGlyph)GetOnNotesPosition(note.Beat.Voice.Index, note.Beat.Index);
     if (beat != null)
     {
         return beat.Container.X + beat.X + beat.NoteNumbers.GetNoteX(note, onEnd);
     }
     return PostBeatGlyphsStart;
 }
开发者ID:eriser,项目名称:alphaTab,代码行数:9,代码来源:TabBarRenderer.cs

示例11: GetNoteY

 public override float GetNoteY(Note note)
 {
     var beat = (TabBeatGlyph)GetOnNotesPosition(note.Beat.Voice.Index, note.Beat.Index);
     if (beat != null)
     {
         return beat.NoteNumbers.GetNoteY(note);
     }
     return 0;
 }
开发者ID:eriser,项目名称:alphaTab,代码行数:9,代码来源:TabBarRenderer.cs

示例12: GetNoteX

 public override float GetNoteX(Note note, bool onEnd = true)
 {
     ScoreBeatGlyph g = (ScoreBeatGlyph)GetOnNotesPosition(note.Beat.Voice.Index, note.Beat.Index);
     if (g != null)
     {
         return g.Container.X + g.X + g.NoteHeads.GetNoteX(note, onEnd);
     }
     return 0;
 }
开发者ID:eriser,项目名称:alphaTab,代码行数:9,代码来源:ScoreBarRenderer.cs

示例13: ShouldCreateGlyphForNote

 protected override bool ShouldCreateGlyphForNote(EffectBarRenderer renderer, Note note)
 {
     if (!note.IsHarmonic) return false;
     if (note.Beat != _beat || note.HarmonicType > _beatType)
     {
         _beatType = note.HarmonicType;
     }
     return true;
 }
开发者ID:eriser,项目名称:alphaTab,代码行数:9,代码来源:HarmonicsEffectInfo.cs

示例14: GetNoteY

 public override float GetNoteY(Note note)
 {
     ScoreBeatGlyph beat = (ScoreBeatGlyph)GetOnNotesPosition(note.Beat.Voice.Index, note.Beat.Index);
     if (beat != null)
     {
         return beat.NoteHeads.GetNoteY(note);
     }
     return 0;
 }
开发者ID:eriser,项目名称:alphaTab,代码行数:9,代码来源:ScoreBarRenderer.cs

示例15: ParseTied

 private static void ParseTied(IXmlNode element, Note note)
 {
     if (element.GetAttribute("type") == "start")
     {
         note.IsTieOrigin = true;
     }
     else
     {
         note.IsTieDestination = true;
     }
 }
开发者ID:CoderLine,项目名称:alphaTab,代码行数:11,代码来源:MusicXml2Importer.cs


注:本文中的AlphaTab.Model.Note类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。