Пример #1
0
 public Mapping(Stream stream)
     : base(stream)
 {
     MidiNoteBindingId = stream.ReadInt32BigE();
     Type             = (MappingType)stream.ReadInt32BigE();
     TraktorControlId = stream.ReadInt32BigE();
     Settings         = new MappingSettings(stream);
 }
Пример #2
0
 public Mapping(Stream stream)
     : base(stream)
 {
     MidiNoteBindingId = stream.ReadInt32BigE();
     Type = (MappingType)stream.ReadInt32BigE();
     TraktorControlId = stream.ReadInt32BigE();
     Settings = new MappingSettings(stream);
 }
Пример #3
0
 public MidiDefinition(Stream stream)
     : base(stream)
 {
     MidiNote        = stream.ReadWideStringBigE();
     MidiControlType = (MidiControlType)stream.ReadInt32BigE();
     MinValue        = stream.ReadFloatBigE();
     MaxValue        = stream.ReadFloatBigE();
     EncoderMode     = (EncoderMode)stream.ReadInt32BigE();
     ControlId       = stream.ReadInt32BigE();
 }
Пример #4
0
 public MidiDefinition(Stream stream)
     : base(stream)
 {
     MidiNote    = stream.ReadWideStringBigE();
     Unknown1    = stream.ReadInt32BigE();
     Unknown2    = stream.ReadInt32BigE();
     Velocity    = stream.ReadFloatBigE();
     EncoderMode = (MidiEncoderMode)stream.ReadInt32BigE();
     ControlId   = stream.ReadInt32BigE();
 }
Пример #5
0
 public MidiDefinition(Stream stream)
     : base(stream)
 {
     MidiNote = stream.ReadWideStringBigE();
     Unknown1 = stream.ReadInt32BigE();
     Unknown2 = stream.ReadInt32BigE();
     Velocity = stream.ReadFloatBigE();
     EncoderMode = (MidiEncoderMode) stream.ReadInt32BigE();
     ControlId = stream.ReadInt32BigE();
 }
Пример #6
0
        public DVST(Stream stream)
            : base(stream)
        {
            Unknown1 = stream.ReadBoolBigE();
            Unknown2 = stream.ReadInt32BigE();
            Unknown3 = stream.ReadInt32BigE();
            Unknown4 = stream.ReadInt32BigE();

            var len = stream.ReadInt32BigE();

            Xml = stream.ReadASCIIString(len);
        }
Пример #7
0
        public Mapping(Stream stream)
            : base(stream)
        {
            MidiNoteBindingId = stream.ReadInt32BigE();
            Type             = (MappingType)stream.ReadInt32BigE();
            TraktorControlId = stream.ReadInt32BigE();
            Settings         = new MappingSettings(stream);

            if (Type == MappingType.Out && Settings.ControlType == MappingControlType.Button)
            {
                // TODO: check if this is ok
                Settings.ControlType     = MappingControlType.LED;
                Settings.InteractionMode = MappingInteractionMode.Output;
            }
        }
Пример #8
0
 public DIOI(Stream stream)
     : base(stream)
 {
     Unknown = stream.ReadInt32BigE();
     if (Unknown != 1)
     {
     }
 }
Пример #9
0
        public MidiNoteBindingList(Stream stream)
            : base(stream)
        {
            int count = stream.ReadInt32BigE();
            Bindings = new List<MidiNoteBinding>();

            for (int i = 0; i < count; i++)
                Bindings.Add(new MidiNoteBinding(stream));
        }
Пример #10
0
        public DevicesList(Stream stream)
            : base(stream)
        {
            int count = stream.ReadInt32BigE();
            List = new List<Device>();

            for (int i = 0; i < count; i++)
                List.Add(new Device(stream));
        }
Пример #11
0
        public MidiOutDefinitions(Stream stream)
            : base(stream)
        {
            int count = stream.ReadInt32BigE();
            Definitions = new List<MidiDefinition>();

            for (int i = 0; i < count; i++)
                Definitions.Add(new MidiDefinition(stream));
        }
Пример #12
0
        public MappingsList(Stream stream)
            : base(stream)
        {
            int count = stream.ReadInt32BigE();
            Mappings = new List<Mapping>();

            for (int i = 0; i < count; i++)
                Mappings.Add(new Mapping(stream));
        }
Пример #13
0
        public MappingsList(Stream stream)
            : base(stream)
        {
            int count = stream.ReadInt32BigE();

            Mappings = new List <Mapping>();

            for (int i = 0; i < count; i++)
            {
                Mappings.Add(new Mapping(stream));
            }
        }
Пример #14
0
        public MidiNoteBindingList(Stream stream)
            : base(stream)
        {
            int count = stream.ReadInt32BigE();

            Bindings = new List <MidiNoteBinding>();

            for (int i = 0; i < count; i++)
            {
                Bindings.Add(new MidiNoteBinding(stream));
            }
        }
Пример #15
0
        public DevicesList(Stream stream)
            : base(stream)
        {
            int count = stream.ReadInt32BigE();

            List = new List <Device>();

            for (int i = 0; i < count; i++)
            {
                List.Add(new Device(stream));
            }
        }
Пример #16
0
        public MidiOutDefinitions(Stream stream)
            : base(stream)
        {
            int count = stream.ReadInt32BigE();

            Definitions = new List <MidiDefinition>();

            for (int i = 0; i < count; i++)
            {
                Definitions.Add(new MidiDefinition(stream));
            }
        }
Пример #17
0
 public DIOI(Stream stream)
     : base(stream)
 {
     Unknown = stream.ReadInt32BigE();
 }
Пример #18
0
 public MappingSettings(Stream stream)
     : base(stream)
 {
     Unknown1 = stream.ReadInt32BigE();
     ControllerType = (MappingControllerType) stream.ReadInt32BigE();
     InteractionMode = (MappingInteractionMode) stream.ReadInt32BigE();
     Deck = (MappingTargetDeck) stream.ReadInt32BigE();
     AutoRepeat = stream.ReadBoolBigE();
     Invert = stream.ReadBoolBigE();
     SoftTakeover = stream.ReadBoolBigE();
     RotarySensitivity = stream.ReadFloatBigE();
     RotaryAcceleration = stream.ReadFloatBigE();
     Unknown10 = stream.ReadInt32BigE();
     Unknown11 = stream.ReadInt32BigE();
     SetValueTo = stream.ReadFloatBigE();
     Comment = stream.ReadWideStringBigE();
     ModifierOneId = stream.ReadInt32BigE();
     Unknown15 = stream.ReadInt32BigE();
     ModifierOneValue = stream.ReadInt32BigE();
     ModifierTwoId = stream.ReadInt32BigE();
     Unknown18 = stream.ReadInt32BigE();
     ModifierTwoValue = stream.ReadInt32BigE();
     Unknown20 = stream.ReadInt32BigE();
     LedMinControllerRange = stream.ReadFloatBigE();
     Unknown22 = stream.ReadInt32BigE();
     LedMaxControllerRange = stream.ReadFloatBigE();
     LedMinMidiRange = stream.ReadInt32BigE();
     LedMaxMidiRange = stream.ReadInt32BigE();
     LedInvert = stream.ReadInt32BigE();
     LedBlend = stream.ReadInt32BigE();
     Unknown29 = stream.ReadInt32BigE();
     Resolution = (MappingResolution) stream.ReadInt32BigE();
     Unknown30 = stream.ReadInt32BigE();
 }
Пример #19
0
 protected Frame(Stream stream)
 {
     FrameId         = stream.ReadASCIIString(4);
     FrameSizeOnDisk = stream.ReadInt32BigE();
 }
Пример #20
0
 public DeviceTargetInfo(Stream stream)
     : base(stream)
 {
     DeviceTarget = (DeviceTarget)stream.ReadInt32BigE();
 }
Пример #21
0
 protected Frame(Stream stream)
 {
     FrameId = stream.ReadASCIIString(4);
     FrameSizeOnDisk = stream.ReadInt32BigE();
 }
Пример #22
0
 public static bool ReadBoolBigE(this Stream stream)
 {
     return(stream.ReadInt32BigE() == 1);
 }
Пример #23
0
        public static string ReadWideStringBigE(this Stream stream)
        {
            int length = stream.ReadInt32BigE() * 2;

            return(Encoding.BigEndianUnicode.GetString(stream.ReadBytes(length)));
        }
Пример #24
0
 public VersionInfo(Stream stream)
     : base(stream)
 {
     Version = stream.ReadWideStringBigE();
     MappingFileRevision = stream.ReadInt32BigE();
 }
Пример #25
0
 protected Frame(Stream stream)
 {
     FrameId         = stream.ReadASCIIString(FRAME_ID_FIXED_LENGTH);
     FrameSizeOnDisk = stream.ReadInt32BigE();
 }
Пример #26
0
 public VersionInfo(Stream stream)
     : base(stream)
 {
     Version             = stream.ReadWideStringBigE();
     MappingFileRevision = stream.ReadInt32BigE();
 }
Пример #27
0
 public MappingSettings(Stream stream)
     : base(stream)
 {
     Unknown1              = stream.ReadInt32BigE();
     ControllerType        = (MappingControllerType)stream.ReadInt32BigE();
     InteractionMode       = (MappingInteractionMode)stream.ReadInt32BigE();
     Deck                  = (MappingTargetDeck)stream.ReadInt32BigE();
     AutoRepeat            = stream.ReadBoolBigE();
     Invert                = stream.ReadBoolBigE();
     SoftTakeover          = stream.ReadBoolBigE();
     RotarySensitivity     = stream.ReadFloatBigE();
     RotaryAcceleration    = stream.ReadFloatBigE();
     Unknown10             = stream.ReadInt32BigE();
     Unknown11             = stream.ReadInt32BigE();
     SetValueTo            = stream.ReadFloatBigE();
     Comment               = stream.ReadWideStringBigE();
     ModifierOneId         = stream.ReadInt32BigE();
     Unknown15             = stream.ReadInt32BigE();
     ModifierOneValue      = stream.ReadInt32BigE();
     ModifierTwoId         = stream.ReadInt32BigE();
     Unknown18             = stream.ReadInt32BigE();
     ModifierTwoValue      = stream.ReadInt32BigE();
     Unknown20             = stream.ReadInt32BigE();
     LedMinControllerRange = stream.ReadFloatBigE();
     Unknown22             = stream.ReadInt32BigE();
     LedMaxControllerRange = stream.ReadFloatBigE();
     LedMinMidiRange       = stream.ReadInt32BigE();
     LedMaxMidiRange       = stream.ReadInt32BigE();
     LedInvert             = stream.ReadInt32BigE();
     LedBlend              = stream.ReadInt32BigE();
     Unknown29             = stream.ReadInt32BigE();
     Resolution            = (MappingResolution)stream.ReadInt32BigE();
     Unknown30             = stream.ReadInt32BigE();
 }
Пример #28
0
 public DeviceTargetInfo(Stream stream)
     : base(stream)
 {
     Target = (DeviceTarget) stream.ReadInt32BigE();
 }
Пример #29
0
        public MappingSettings(Stream stream)
            : base(stream)
        {
            DeviceType         = (DeviceType)stream.ReadInt32BigE();
            ControlType        = (MappingControlType)stream.ReadInt32BigE();
            InteractionMode    = (MappingInteractionMode)stream.ReadInt32BigE();
            Target             = (MappingTargetDeck)stream.ReadInt32BigE();
            AutoRepeat         = stream.ReadBoolBigE();
            Invert             = stream.ReadBoolBigE();
            SoftTakeover       = stream.ReadBoolBigE();
            RotarySensitivity  = stream.ReadFloatBigE();
            RotaryAcceleration = stream.ReadFloatBigE();

            HasValueUI  = stream.ReadBoolBigE();
            ValueUIType = (ValueUIType)stream.ReadInt32BigE();
            SetValueTo  = stream.ReadBytesBigE(4);

            Comment = stream.ReadWideStringBigE();

            ConditionOneId     = stream.ReadInt32BigE();
            ConditionOneTarget = (MappingTargetDeck)stream.ReadInt32BigE();
            ConditionOneValue  = stream.ReadBytesBigE(4);
            ConditionTwoId     = stream.ReadInt32BigE();
            ConditionTwoTarget = (MappingTargetDeck)stream.ReadInt32BigE();
            ConditionTwoValue  = stream.ReadBytesBigE(4);

            var ledMinControllerRangeValueUIType = (ValueUIType)stream.ReadInt32BigE();

            LedMinControllerRange = stream.ReadBytesBigE(4);
            var ledMaxControllerRangeValueUIType = (ValueUIType)stream.ReadInt32BigE();

            LedMaxControllerRange = stream.ReadBytesBigE(4);

            LedMinMidiRange = stream.ReadInt32BigE();
            LedMaxMidiRange = stream.ReadInt32BigE();

            if (DeviceType != DeviceType.Proprietary_Synth)
            {
                LedInvert = stream.ReadBoolBigE();
                LedBlend  = stream.ReadBoolBigE();

                if (DeviceType != DeviceType.Proprietary_Audio)
                {
                    // determined dynamically, see above
                    var unknownValueUIType = (ValueUIType)stream.ReadInt32BigE();

                    Resolution = (MappingResolution)stream.ReadInt32BigE();
                }

                if (DeviceType == DeviceType.GenericMidi)
                {
                    UseFactoryMap = stream.ReadBoolBigE();
                }
            }
        }
Пример #30
0
 public MidiNoteBinding(Stream stream)
     : base(stream)
 {
     BindingId = stream.ReadInt32BigE();
     MidiNote  = stream.ReadWideStringBigE();
 }
Пример #31
0
 public MidiNoteBinding(Stream stream)
     : base(stream)
 {
     BindingId = stream.ReadInt32BigE();
     MidiNote = stream.ReadWideStringBigE();
 }