public void ReadBeatEffects(Beat beat)
{
var flags = Data.ReadByte();
var flags2 = 0;
if (_versionNumber >= 400)
{
flags2 = Data.ReadByte();
}
beat.FadeIn = (flags & 0x10) != 0;
if ( (_versionNumber < 400 && (flags & 0x01) != 0) || (flags & 0x02) != 0)
{
beat.Vibrato = VibratoType.Slight;
}
beat.HasRasgueado = (flags2 & 0x01) != 0;
if ((flags & 0x20) != 0 && _versionNumber >= 400)
{
var slapPop = Data.ReadSignedByte();
switch (slapPop)
{
case 1:
beat.Tap = true;
break;
case 2:
beat.Slap = true;
break;
case 3:
beat.Pop = true;
break;
}
}
else if ((flags & 0x20) != 0)
{
var slapPop = Data.ReadSignedByte();
switch (slapPop)
{
case 1:
beat.Tap = true;
break;
case 2:
beat.Slap = true;
break;
case 3:
beat.Pop = true;
break;
}
Data.Skip(4);
}
if ((flags2 & 0x04) != 0)
{
ReadTremoloBarEffect(beat);
}
if ((flags & 0x40) != 0)
{
int strokeUp;
int strokeDown;
if (_versionNumber < 500)
{
strokeDown = Data.ReadByte();
strokeUp = Data.ReadByte();
}
else
{
strokeUp = Data.ReadByte();
strokeDown = Data.ReadByte();
}
if (strokeUp > 0)
{
beat.BrushType = BrushType.BrushUp;
beat.BrushDuration = ToStrokeValue(strokeUp);
}
else if (strokeDown > 0)
{
beat.BrushType = BrushType.BrushDown;
beat.BrushDuration = ToStrokeValue(strokeDown);
}
}
if ((flags2 & 0x02) != 0)
{
switch (Data.ReadSignedByte())
{
case 0:
beat.PickStroke = PickStrokeType.None;
break;
case 1:
beat.PickStroke = PickStrokeType.Up;
break;
case 2:
beat.PickStroke = PickStrokeType.Down;
break;
}
}
}