示例#1
0
 public override void ConvertToBinary(System.IO.BinaryWriter writer)
 {
     if (this.DataLength > 0)
     {
         base.ConvertToBinary(writer);
         UtilBinary.WriteValue(writer, this.Port);
     }
 }
示例#2
0
        public override void ConvertToBinary(System.IO.BinaryWriter writer)
        {
            base.ConvertToBinary(writer);

            UtilBinary.WriteValue(writer, this.MetaEventId);
            UtilBinary.WriteValue(writer, (byte)this.Type);
            UtilBinary.WriteVariableLengthValue(writer, this.DataLength);    //use variable length binary
        }
示例#3
0
 public override uint GetSizeInBytes()
 {
     return(UtilBinary.GetLengthOfVariableLengthValue(this.DeltaTicks)   //base holds the delta ticks should always be zero for meta event
            + sizeof(byte)                                               //meta event id FF
            + sizeof(byte)                                               //meta type
            + UtilBinary.GetLengthOfVariableLengthValue(this.DataLength) //the length of the number that stores the length of the data
            + (uint)this.DataLength);
 }
示例#4
0
 public override void ConvertToBinary(System.IO.BinaryWriter writer)
 {
     if (this.DataLength > 0)
     {
         base.ConvertToBinary(writer);
         UtilBinary.WriteValue(writer, this.Hours);
         UtilBinary.WriteValue(writer, this.Minutes);
         UtilBinary.WriteValue(writer, this.Seconds);
         UtilBinary.WriteValue(writer, this.Frames);
         UtilBinary.WriteValue(writer, this.SubFrames);
     }
 }
示例#5
0
        public virtual uint GetSizeInBytes()
        {
            if (this.DataLength > 0)
            {
                uint size = UtilBinary.GetLengthOfVariableLengthValue(this.DeltaTicks)   //base holds the delta ticks should always be zero for meta event
                            + sizeof(byte)                                               //meta event id FF
                            + sizeof(byte)                                               //meta type
                            + UtilBinary.GetLengthOfVariableLengthValue(this.DataLength) //the length of the number that stores the length of the data
                            + (uint)this.DataLength;                                     //the length of the data (set this in the concrete class)

                return(size);
            }
            else
            {
                return(0);
            }
        }
示例#6
0
 public override void ConvertToBinary(System.IO.BinaryWriter writer)
 {
     base.ConvertToBinary(writer);
     UtilBinary.WriteValue(writer, this.ControllerType);
     UtilBinary.WriteValue(writer, this.Value);
 }
示例#7
0
 public override void ConvertToBinary(System.IO.BinaryWriter writer)
 {
     base.ConvertToBinary(writer);
     UtilBinary.WriteValue(writer, this.PitchValueMSB);
     UtilBinary.WriteValue(writer, this.PitchValueLSB);
 }
 public override void ConvertToBinary(System.IO.BinaryWriter writer)
 {
     base.ConvertToBinary(writer);
     UtilBinary.WriteValue(writer, this.ProgramNumber);
 }
示例#9
0
 public override void ConvertToBinary(System.IO.BinaryWriter writer)
 {
     base.ConvertToBinary(writer);
     UtilBinary.WriteValue(writer, this.NoteNumber);
     UtilBinary.WriteValue(writer, this.Velocity);
 }
示例#10
0
 public override void ConvertToBinary(System.IO.BinaryWriter writer)
 {
     base.ConvertToBinary(writer);
     UtilBinary.WriteValue(writer, this.Key);
     UtilBinary.WriteValue(writer, this.Scale);
 }
示例#11
0
 public virtual void ConvertToBinary(System.IO.BinaryWriter writer)
 {
     UtilBinary.WriteVariableLengthValue(writer, this.DeltaTicks);      //use variable length binary
 }