Class ChannelEvent
Represents a MIDI file channel event.
Inheritance
ChannelEvent
Inherited Members
Namespace: Melanchall.DryWetMidi.Core
Assembly: Melanchall.DryWetMidi.dll
Syntax
public abstract class ChannelEvent : MidiEvent
Constructors
ChannelEvent(MidiEventType)
Initializes a new instance of the ChannelEvent with the specified parameters count.
Declaration
protected ChannelEvent(MidiEventType eventType)
Parameters
| Type | Name | Description |
|---|---|---|
| MidiEventType | eventType | The type of event. |
Properties
Channel
Gets or sets channel for this event.
Declaration
public FourBitNumber Channel { get; set; }
Property Value
| Type | Description |
|---|---|
| FourBitNumber |
Remarks
Channel is a zero-based number in DryWetMIDI, valid values are from
0 to 15.
Other libraries and software can use one-based channel numbers (i.e.from 1
to 16) so be aware about that: channel 10 in such software will be 9
in DryWetMIDI.Methods
ReadDataByte(MidiReader, ReadingSettings)
Reads channel event's data byte using the specified reader and settings.
Declaration
protected byte ReadDataByte(MidiReader reader, ReadingSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| MidiReader | reader | Reader to read data byte with. |
| ReadingSettings | settings | Settings according to which a data byte should be read and processed. |
Returns
| Type | Description |
|---|---|
| byte | A data byte read with reader. |