internal MidiTuneRequestMessage(byte[] rawData, TimeSpan timestamp) { MidiMessageValidators.VerifyMessageLength(rawData, 1, Type); MidiMessageValidators.VerifyMessageType(rawData[0], Type); RawData = new Storage.Streams.Buffer(rawData); Timestamp = timestamp; }
internal MidiSongSelectMessage(byte[] rawData, TimeSpan timestamp) { MidiMessageValidators.VerifyMessageLength(rawData, 2, Type); MidiMessageValidators.VerifyMessageType(rawData[0], Type); MidiMessageValidators.VerifyRange(rawData[1], MidiMessageParameter.Song); _buffer = new Storage.Streams.Buffer(rawData); Timestamp = timestamp; }
internal MidiTimeCodeMessage(byte[] rawData, TimeSpan timestamp) { MidiMessageValidators.VerifyMessageLength(rawData, 2, Type); MidiMessageValidators.VerifyMessageType(rawData[0], Type); MidiMessageValidators.VerifyRange(MidiHelpers.GetFrame(rawData[1]), MidiMessageParameter.Frame); MidiMessageValidators.VerifyRange(MidiHelpers.GetFrameValues(rawData[1]), MidiMessageParameter.FrameValues); _buffer = new Storage.Streams.Buffer(rawData); Timestamp = timestamp; }
internal MidiChannelPressureMessage(byte[] rawData, TimeSpan timestamp) { MidiMessageValidators.VerifyMessageLength(rawData, 2, MidiMessageType.ChannelPressure); MidiMessageValidators.VerifyMessageType(rawData[0], MidiMessageType.ChannelPressure); MidiMessageValidators.VerifyRange(MidiHelpers.GetChannel(rawData[0]), MidiMessageParameter.Channel); MidiMessageValidators.VerifyRange(rawData[1], MidiMessageParameter.Pressure); _buffer = new Storage.Streams.Buffer(rawData); Timestamp = timestamp; }
internal MidiNoteOnMessage(byte[] rawData, TimeSpan timestamp) { MidiMessageValidators.VerifyMessageLength(rawData, 3, Type); MidiMessageValidators.VerifyMessageType(rawData[0], Type); MidiMessageValidators.VerifyRange(MidiHelpers.GetChannel(rawData[0]), MidiMessageParameter.Channel); MidiMessageValidators.VerifyRange(rawData[1], MidiMessageParameter.Note); MidiMessageValidators.VerifyRange(rawData[2], MidiMessageParameter.Velocity); _buffer = new Storage.Streams.Buffer(rawData); Timestamp = timestamp; }