示例#1
0
        protected override void ImportData(AwesomeReader ar)
        {
            ar.ReadInt32(); // Always 11
            ar.ReadInt32(); // Size of each VoxEntry (64 bytes)

            int count = ar.ReadInt32();

            ar.ReadInt32(); // Offset to entries (Always 4)

            for (int i = 0; i < count; i++)
            {
                // Reads vox entry (64 bytes)
                TabEntry entry = new TabEntry();

                // 0 - 19 bytes
                entry.Start        = ar.ReadSingle();
                entry.End          = ar.ReadSingle();
                entry.StringNumber = ar.ReadInt32(); // String (1-6)
                entry.FretNumber   = ar.ReadInt32(); // Fret (0-22?)
                entry.NoteColor    = ar.ReadInt32(); // Finger (0-6)

                // 20 - 39
                entry.SpecialOperation = ar.ReadInt32();
                entry.BendType         = ar.ReadInt32();
                entry.BendStrength     = ar.ReadSingle();
                entry.Vibrato          = Convert.ToBoolean(ar.ReadInt32());
                ar.ReadInt32(); // Should be zero

                // 40 - 59
                ar.ReadInt32();  // Should be 63.0 for both.
                ar.ReadInt32();
                ar.ReadSingle(); // Observed: 0.0, -240.0
                ar.ReadSingle(); // Observed: 0.0, -114.0, 126.0

                entry.Extended = ar.ReadBoolean();
                entry.PalmMute = ar.ReadBoolean();
                entry.Tremelo  = ar.ReadBoolean();
                ar.ReadByte(); // Not sure.

                // 60 - 63
                ar.ReadBytes(3);
                entry.PopSlap = ar.ReadByte();

                Entries.Add(entry);
            }
        }
示例#2
0
        internal override void ReadData(AwesomeReader ar)
        {
            Events.Clear();
            ar.BaseStream.Position += 8; // Skips constants

            int count = ar.ReadInt32();

            ar.BaseStream.Position += 4;

            for (int i = 0; i < count; i++)
            {
                // Reads tab entry (64 bytes)
                TabEntry entry = new TabEntry();
                entry.Start = ar.ReadSingle();
                entry.End   = ar.ReadSingle();

                entry.StringNumber = ar.ReadInt32();
                entry.FretNumber   = ar.ReadInt32();
                entry.Finger       = (TabFinger)ar.ReadInt32();

                entry.NoteType     = (TabNoteType)ar.ReadInt32();
                entry.BendType     = (TabBendType)ar.ReadInt32();
                entry.BendStrength = ar.ReadSingle();
                entry.VibratoType  = (VibratoType)ar.ReadInt32();

                ar.BaseStream.Position += 4; // Always 0?
                entry.Unknown1          = ar.ReadSingle();
                entry.Unknown2          = ar.ReadSingle();
                entry.Unknown3          = ar.ReadSingle();
                entry.Unknown4          = ar.ReadSingle();

                entry.ExtendedNote      = ar.ReadBoolean();
                entry.PalmMute          = ar.ReadBoolean();
                entry.Tremelo           = ar.ReadBoolean();
                ar.BaseStream.Position += 1; // Always 0

                entry.BassType = (TabBassType)ar.ReadInt32();
                Events.Add(entry);
            }
        }