Пример #1
0
            public void ChannelPressureEvent()
            {
                var value = GetRandomValue();

                var x = new ChannelPressureEvent(value.ticks, value.channel, GetRandomByte());
                var y = ReDeserialize(x);

                Assert.That(x.pressure == y.pressure);
            }
Пример #2
0
            private void _read()
            {
                _vTime       = new VlqBase128Be(m_io);
                _eventHeader = m_io.ReadU1();
                if (EventHeader == 255)
                {
                    _metaEventBody = new MetaEventBody(m_io, this, m_root);
                }
                if (EventHeader == 240)
                {
                    _sysexBody = new SysexEventBody(m_io, this, m_root);
                }
                switch (EventType)
                {
                case 224: {
                    _eventBody = new PitchBendEvent(m_io, this, m_root);
                    break;
                }

                case 144: {
                    _eventBody = new NoteOnEvent(m_io, this, m_root);
                    break;
                }

                case 208: {
                    _eventBody = new ChannelPressureEvent(m_io, this, m_root);
                    break;
                }

                case 192: {
                    _eventBody = new ProgramChangeEvent(m_io, this, m_root);
                    break;
                }

                case 160: {
                    _eventBody = new PolyphonicPressureEvent(m_io, this, m_root);
                    break;
                }

                case 176: {
                    _eventBody = new ControllerEvent(m_io, this, m_root);
                    break;
                }

                case 128: {
                    _eventBody = new NoteOffEvent(m_io, this, m_root);
                    break;
                }
                }
            }
 public ChannelPressureEventLabel(ChannelPressureEvent channelPressureEvent) : base(channelPressureEvent)
 {
 }