示例#1
0
        public ChannelPressureMessage(Channel channel, int pressure)
        {
            StructHelper.IsWithin7BitRange(nameof(pressure), pressure);

            Channel  = channel;
            Pressure = pressure;
        }
        // TODO Create detail enum of General MIDI instruments, see https://en.wikipedia.org/wiki/General_MIDI

        public ProgramChangeMessage(Channel channel, int program)
        {
            StructHelper.IsWithin7BitRange(nameof(program), program);

            Channel = channel;
            Program = program;
        }
        public PolyphonicKeyPressureMessage(Channel channel, Key key, int pressure)
        {
            StructHelper.IsWithin7BitRange(nameof(pressure), pressure);

            Channel  = channel;
            Key      = key;
            Pressure = pressure;
        }
示例#4
0
        public NoteOnMessage(Channel channel, Key key, int velocity)
        {
            StructHelper.IsWithin7BitRange(nameof(velocity), velocity);

            Channel  = channel;
            Key      = key;
            Velocity = velocity;
        }
        public ControlChangeMessage(Channel channel, int control, int value)
        {
            StructHelper.IsWithin7BitRange(nameof(control), control);
            StructHelper.IsWithin7BitRange(nameof(value), value);

            Channel         = channel;
            Control         = control;
            ControlFunction = ControlFunction.Undefined.OrValueIfDefined(control);
            Value           = value;
        }
示例#6
0
        public SongSelectMessage(int song)
        {
            StructHelper.IsWithin7BitRange(nameof(song), song);

            Song = song;
        }