public void ReadArtificialHarmonic(Note note)
{
var type = Data.ReadByte();
if (_versionNumber >= 500)
{
switch (type)
{
case 1:
note.HarmonicType = HarmonicType.Natural;
note.HarmonicValue = DeltaFretToHarmonicValue(note.Fret);
break;
case 2:
// ReSharper disable UnusedVariable
var harmonicTone = Data.ReadByte();
var harmonicKey = Data.ReadByte();
var harmonicOctaveOffset = Data.ReadByte();
note.HarmonicType = HarmonicType.Artificial;
// ReSharper restore UnusedVariable
break;
// TODO: how to calculate the harmonic value?
case 3:
note.HarmonicType = HarmonicType.Tap;
note.HarmonicValue = DeltaFretToHarmonicValue(Data.ReadByte());
break;
case 4:
note.HarmonicType = HarmonicType.Pinch;
note.HarmonicValue = 12;
break;
case 5:
note.HarmonicType = HarmonicType.Semi;
note.HarmonicValue = 12;
break;
}
}
else if (_versionNumber >= 400)
{
switch (type)
{
case 1:
note.HarmonicType = HarmonicType.Natural;
break;
case 3:
note.HarmonicType = HarmonicType.Tap;
break;
case 4:
note.HarmonicType = HarmonicType.Pinch;
break;
case 5:
note.HarmonicType = HarmonicType.Semi;
break;
case 15:
note.HarmonicType = HarmonicType.Artificial;
break;
case 17:
note.HarmonicType = HarmonicType.Artificial;
break;
case 22:
note.HarmonicType = HarmonicType.Artificial;
break;
}
}
}