本文整理汇总了C#中AlphaTab.Model.Beat.AddWhammyBarPoint方法的典型用法代码示例。如果您正苦于以下问题:C# Beat.AddWhammyBarPoint方法的具体用法?C# Beat.AddWhammyBarPoint怎么用?C# Beat.AddWhammyBarPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AlphaTab.Model.Beat
的用法示例。
在下文中一共展示了Beat.AddWhammyBarPoint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Clone
public Beat Clone()
{
var beat = new Beat();
for (int i = 0, j = WhammyBarPoints.Count; i < j; i++)
{
beat.AddWhammyBarPoint(WhammyBarPoints[i].Clone());
}
for (int i = 0, j = Notes.Count; i < j; i++)
{
beat.AddNote(Notes[i].Clone());
}
CopyTo(this, beat);
for (int i = 0, j = Automations.Count; i < j; i++)
{
beat.Automations.Add(Automations[i].Clone());
}
return beat;
}
示例2: ReadTremoloBarEffect
public void ReadTremoloBarEffect(Beat beat)
{
Data.ReadByte(); // type
ReadInt32(); // value
var pointCount = ReadInt32();
if (pointCount > 0)
{
for (int i = 0; i < pointCount; i++)
{
var point = new BendPoint();
point.Offset = ReadInt32(); // 0...60
point.Value = ReadInt32() / BendStep; // 0..12 (amount of quarters)
ReadBool(); // vibrato
beat.AddWhammyBarPoint(point);
}
}
}
示例3: ApplyBeatEffect
//.........这里部分代码省略.........
while (_sy != AlphaTexSymbols.RParensis && _sy != AlphaTexSymbols.Eof)
{
int offset;
int value;
if (exact)
{
if (_sy != AlphaTexSymbols.Number)
{
Error("tremolobar-effect", AlphaTexSymbols.Number);
return false;
}
offset = (int)_syData;
NewSy();
if (_sy != AlphaTexSymbols.Number)
{
Error("tremolobar-effect", AlphaTexSymbols.Number);
return false;
}
value = (int)_syData;
}
else
{
if (_sy != AlphaTexSymbols.Number)
{
Error("tremolobar-effect", AlphaTexSymbols.Number);
return false;
}
offset = 0;
value = (int)_syData;
}
beat.AddWhammyBarPoint(new BendPoint(offset, value));
NewSy();
}
while (beat.WhammyBarPoints.Count > 60)
{
beat.RemoveWhammyBarPoint(beat.WhammyBarPoints.Count - 1);
}
// set positions
if (!exact)
{
var count = beat.WhammyBarPoints.Count;
var step = (60 / count);
var i = 0;
while (i < count)
{
beat.WhammyBarPoints[i].Offset = Math.Min(60, (i * step));
i++;
}
}
else
{
beat.WhammyBarPoints.Sort((a, b) => a.Offset - b.Offset);
}
_allowNegatives = false;
if (_sy != AlphaTexSymbols.RParensis)
{
Error("tremolobar-effect", AlphaTexSymbols.RParensis);
return false;
}