本文整理汇总了C#中AlphaTab.Model.Note类的典型用法代码示例。如果您正苦于以下问题:C# Note类的具体用法?C# Note怎么用?C# Note使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Note类属于AlphaTab.Model命名空间,在下文中一共展示了Note类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: GetNoteX
public float GetNoteX(Note note, bool onEnd = true)
{
if (_noteLookup.ContainsKey(note.String))
{
var n = _noteLookup[note.String];
var pos = X + n.X;
if (onEnd)
{
pos += n.Width;
}
return pos;
}
return 0;
}
开发者ID:eriser,项目名称:alphaTab,代码行数:14,代码来源:ScoreNoteChordGlyph.cs
示例17: MapNoteForDisplay
/// <summary>
/// Maps the given note to a normal note value to place the note at the
/// correct line on score notation
/// </summary>
/// <param name="note"></param>
/// <returns></returns>
public static int MapNoteForDisplay(Note note)
{
var value = note.RealValue;
if (value == 61 || value == 66)
{
return 50;
}
else if (value == 60 || value == 65)
{
return 52;
}
else if ((value >= 35 && value <= 36) || value == 44)
{
return 53;
}
else if (value == 41 || value == 64)
{
return 55;
}
else if (value == 43 || value == 62)
{
return 57;
}
else if (value == 45 || value == 63)
{
return 59;
}
else if (value == 47 || value == 54)
{
return 62;
}
else if (value == 48 || value == 56)
{
return 64;
}
else if (value == 50)
{
return 65;
}
else if (value == 42 || value == 46 || (value >= 49 && value <= 53) || value == 57 || value == 59)
{
return 67;
}
return 60;
}
开发者ID:CoderLine,项目名称:alphaTab,代码行数:51,代码来源:PercussionMapper.cs
示例18: CreateTies
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);
}
}
开发者ID:eriser,项目名称:alphaTab,代码行数:19,代码来源:TabBeatContainerGlyph.cs
示例19: CreateAccidentalGlyph
private void CreateAccidentalGlyph(Note n, AccidentalGroupGlyph accidentals)
{
var sr = (ScoreBarRenderer)Renderer;
var accidental = sr.AccidentalHelper.ApplyAccidental(n);
var noteLine = sr.GetNoteLine(n);
var isGrace = Container.Beat.GraceType != GraceType.None;
switch (accidental)
{
case AccidentalType.Sharp:
accidentals.AddGlyph(new SharpGlyph(0, sr.GetScoreY(noteLine), isGrace));
break;
case AccidentalType.Flat:
accidentals.AddGlyph(new FlatGlyph(0, sr.GetScoreY(noteLine), isGrace));
break;
case AccidentalType.Natural:
accidentals.AddGlyph(new NaturalizeGlyph(0, sr.GetScoreY(noteLine + 1), isGrace));
break;
}
}
开发者ID:eriser,项目名称:alphaTab,代码行数:19,代码来源:ScoreBeatPreNotesGlyph.cs
示例20: NoteNumberGlyph
public NoteNumberGlyph(float x, float y, Note n, bool isGrace)
: base(x, y)
{
_isGrace = isGrace;
if (!n.IsTieDestination)
{
_noteString = n.IsDead ? "X" : n.Fret.ToString();
if (n.IsGhost)
{
_noteString = "(" + _noteString + ")";
}
}
else if (n.Beat.Index == 0)
{
_noteString = "(" + n.TieOrigin.Fret + ")";
}
else
{
_noteString = "";
}
}
开发者ID:eriser,项目名称:alphaTab,代码行数:21,代码来源:NoteNumberGlyph.cs
注:本文中的AlphaTab.Model.Note类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论