Class ChannelPrefixEvent
Represents a MIDI Channel Prefix meta event.
Inherited Members
Namespace: Melanchall.DryWetMidi.Core
Assembly: Melanchall.DryWetMidi.dll
Syntax
public sealed class ChannelPrefixEvent : MetaEvent
Remarks
The MIDI channel prefix meta message specifies a MIDI channel so that meta messages that
follow are specific to a channel.
Constructors
ChannelPrefixEvent()
Initializes a new instance of the ChannelPrefixEvent.
Declaration
public ChannelPrefixEvent()
ChannelPrefixEvent(byte)
Initializes a new instance of the ChannelPrefixEvent with the
specified MIDI channel.
Declaration
public ChannelPrefixEvent(byte channel)
Parameters
| Type | Name | Description |
|---|---|---|
| byte | channel | MIDI channel. |
Properties
Channel
Gets or sets MIDI channel.
Declaration
public byte Channel { get; set; }
Property Value
| Type | Description |
|---|---|
| byte |
Methods
CloneEvent()
Clones event by creating a copy of it.
Declaration
protected override MidiEvent CloneEvent()
Returns
| Type | Description |
|---|---|
| MidiEvent | Copy of the event. |
Overrides
GetContentSize(WritingSettings)
Gets the size of the content of a MIDI meta event.
Declaration
protected override int GetContentSize(WritingSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| WritingSettings | settings | Settings according to which the event's content must be written. |
Returns
| Type | Description |
|---|---|
| int | Size of the event's content. |
Overrides
ReadContent(MidiReader, ReadingSettings, int)
Reads content of a MIDI meta event.
Declaration
protected override void ReadContent(MidiReader reader, ReadingSettings settings, int size)
Parameters
| Type | Name | Description |
|---|---|---|
| MidiReader | reader | Reader to read the content with. |
| ReadingSettings | settings | Settings according to which the event's content must be read. |
| int | size | Size of the event's content. |
Overrides
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents the current object. |
Overrides
WriteContent(MidiWriter, WritingSettings)
Writes content of a MIDI meta event.
Declaration
protected override void WriteContent(MidiWriter writer, WritingSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| MidiWriter | writer | Writer to write the content with. |
| WritingSettings | settings | Settings according to which the event's content must be written. |