コード例 #1
0
                public static Range Convert(MIDI.RangeMap range)
                {
                    var ret = new Range();

                    ret.x          = range.X;
                    ret.y          = range.Y;
                    ret.width      = range.Width;
                    ret.height     = range.Height;
                    ret.deviceName = range.Device.Device.Name;
                    ret.virtualX   = range.VirtualX;
                    ret.virtualY   = range.VirtualY;
                    foreach (var child in range.Children)
                    {
                        ret.children.Add(Convert(child));
                    }
                    return(ret);
                }
コード例 #2
0
                    public static RangeMap Convert(MIDI.RangeMap item)
                    {
                        var activeArea = new SessionFileFormat.ImplantFormat.RangeMap();

                        activeArea.x          = item.X;
                        activeArea.y          = item.Y;
                        activeArea.width      = item.Width;
                        activeArea.height     = item.Height;
                        activeArea.virtualX   = item.VirtualX;
                        activeArea.virtualY   = item.VirtualY;
                        activeArea.deviceName = item.Device.Device.Name;
                        foreach (var child in item.Children)
                        {
                            activeArea.children.Add(Convert(child));
                        }
                        return(activeArea);
                    }
コード例 #3
0
                /// <summary>
                /// Creates a real RangeMap object from this data
                /// using the current devices in the session.
                /// </summary>
                public MIDI.RangeMap ToRangeMap()
                {
                    var device = UserSession.Current.Devices.GetMappedDeviceByName(deviceName)
                                 ?? MIDI.MappedMidiDevice.CreateNullDevice();

                    var range = new MIDI.RangeMap(device);

                    range.X        = x;
                    range.Y        = y;
                    range.Width    = width;
                    range.Height   = height;
                    range.VirtualX = virtualX;
                    range.VirtualY = virtualY;
                    foreach (var child in children)
                    {
                        range.Children.Add(child.ToRangeMap());
                    }
                    return(range);
                }
コード例 #4
0
                    public MIDI.RangeMap ToRangeMap()
                    {
                        var device = UserSession.Current.Devices.GetMappedDeviceByName(deviceName);

                        if (device == null)
                        {
                            device = MIDI.MappedMidiDevice.CreateNullDevice();
                        }

                        var ret = new MIDI.RangeMap(device);

                        ret.X        = this.x;
                        ret.Y        = this.y;
                        ret.Width    = this.width;
                        ret.Height   = this.height;
                        ret.VirtualX = this.virtualX;
                        ret.VirtualY = this.virtualY;
                        foreach (var child in this.children)
                        {
                            ret.Children.Add(child.ToRangeMap());
                        }
                        return(ret);
                    }