AlphaTab.Importer.Gp3To5Importer.ReadNoteEffects C# (CSharp) Method

ReadNoteEffects() public method

public ReadNoteEffects ( Track track, Voice voice, Beat beat, Note note ) : void
track Track
voice Voice
beat Beat
note Note
return void
        public void ReadNoteEffects(Track track, Voice voice, Beat beat, Note note)
        {
            var flags = Data.ReadByte();
            var flags2 = 0;
            if (_versionNumber >= 400)
            {
                flags2 = Data.ReadByte();
            }

            if ((flags & 0x01) != 0)
            {
                ReadBend(note);
            }

            if ((flags & 0x10) != 0)
            {
                ReadGrace(voice, note);
            }

            if ((flags2 & 0x04) != 0)
            {
                ReadTremoloPicking(beat);
            }

            if ((flags2 & 0x08) != 0)
            {
                ReadSlide(note);
            }
            else if (_versionNumber < 400)
            {
                if ((flags & 0x04) != 0)
                {
                    note.SlideType = SlideType.Shift;
                }
            }

            if ((flags2 & 0x10) != 0)
            {
                ReadArtificialHarmonic(note);
            }
            else if (_versionNumber < 400)
            {
                if ((flags & 0x04) != 0)
                {
                    note.HarmonicType = HarmonicType.Natural;
                    note.HarmonicValue = DeltaFretToHarmonicValue(note.Fret);
                }
                if ((flags & 0x08) != 0)
                {
                    note.HarmonicType = HarmonicType.Artificial;
                }
            }

            if ((flags2 & 0x20) != 0)
            {
                ReadTrill(note);
            }

            note.IsLetRing = (flags & 0x08) != 0;
            note.IsHammerPullOrigin = (flags & 0x02) != 0;
            if ((flags2 & 0x40) != 0)
            {
                note.Vibrato = VibratoType.Slight;
            }
            note.IsPalmMute = (flags2 & 0x02) != 0;
            note.IsStaccato = (flags2 & 0x01) != 0;
        }