Exemple #1
0
        private CakewalkDrumMapping ReadMapEntry(BinaryReader reader)
        {
            var mapping = new CakewalkDrumMapping();

            reader.ReadInt32(); // unknown
            mapping.InNote = reader.ReadInt32();
            reader.ReadInt32(); // unknown
            reader.ReadInt32(); // unknown
            reader.ReadInt32(); // unknown
            reader.ReadInt32(); // unknown
            reader.ReadInt32(); // unknown
            reader.ReadInt32(); // unknown
            mapping.VelocityScale  = reader.ReadSingle();
            mapping.Channel        = reader.ReadInt32();
            mapping.OutNote        = reader.ReadInt32();
            mapping.OutPort        = reader.ReadInt32();
            mapping.VelocityAdjust = reader.ReadInt32();
            char[] name = reader.ReadChars(32);
            int    nameLength;

            for (nameLength = 0; nameLength < name.Length; nameLength++)
            {
                if (name[nameLength] == 0)
                {
                    break;
                }
            }
            mapping.NoteName = new string(name, 0, nameLength);
            return(mapping);
        }
Exemple #2
0
 private CakewalkDrumMapping ReadMapEntry(BinaryReader reader)
 {
     var mapping = new CakewalkDrumMapping();
     reader.ReadInt32(); // unknown
     mapping.InNote = reader.ReadInt32();
     reader.ReadInt32(); // unknown
     reader.ReadInt32(); // unknown
     reader.ReadInt32(); // unknown
     reader.ReadInt32(); // unknown
     reader.ReadInt32(); // unknown
     reader.ReadInt32(); // unknown
     mapping.VelocityScale = reader.ReadSingle();
     mapping.Channel = reader.ReadInt32();
     mapping.OutNote = reader.ReadInt32();
     mapping.OutPort = reader.ReadInt32();
     mapping.VelocityAdjust = reader.ReadInt32();
     char[] name = reader.ReadChars(32);
     int nameLength;
     for (nameLength = 0; nameLength < name.Length; nameLength++)
     {
         if (name[nameLength] == 0)
             break;
     }
     mapping.NoteName = new string(name, 0, nameLength);
     return mapping;
 }