本文整理汇总了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;
}
示例2: TabSlideLineGlyph
public TabSlideLineGlyph(SlideType type, Note startNote, BeatContainerGlyph parent)
: base(0, 0)
{
_type = type;
_startNote = startNote;
_parent = parent;
}
示例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 = "";
}
}
示例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);
}
}
示例5: BendGlyph
public BendGlyph(Note n, float width, float height)
: base(0, 0)
{
_note = n;
Width = width;
_height = height;
}
示例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));
}
}
示例7: GetNoteY
public float GetNoteY(Note note)
{
if (_noteLookup.ContainsKey(note.String))
{
return Y + _noteLookup[note.String].Y;
}
return 0;
}
示例8: TieGlyph
public TieGlyph(Note startNote, Note endNote, Glyph parent, bool forEnd)
: base(0, 0)
{
StartNote = startNote;
EndNote = endNote;
Parent = parent;
_forEnd = forEnd;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例15: ParseTied
private static void ParseTied(IXmlNode element, Note note)
{
if (element.GetAttribute("type") == "start")
{
note.IsTieOrigin = true;
}
else
{
note.IsTieDestination = true;
}
}