Class PitchBendEvent
Represents a Pitch Bend Change message.
Inherited Members
Namespace: Melanchall.DryWetMidi.Core
Assembly: Melanchall.DryWetMidi.dll
Syntax
public sealed class PitchBendEvent : ChannelEvent
Remarks
This message is sent to indicate a change in the pitch bender (wheel or lever, typically).
The pitch bender is measured by a fourteen bit value. Center (no pitch change) is 0x2000.
Constructors
PitchBendEvent()
Initializes a new instance of the PitchBendEvent.
Declaration
public PitchBendEvent()
PitchBendEvent(ushort)
Initializes a new instance of the PitchBendEvent with the specified
pitch value.
Declaration
public PitchBendEvent(ushort pitchValue)
Parameters
Type | Name | Description |
---|---|---|
ushort | pitchValue | Pitch value. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | pitchValue is out of
[MinPitchValue; MaxPitchValue] range. |
Fields
DefaultPitchValue
Represents the default pitch value which means no pitch bend applied.
Declaration
public const ushort DefaultPitchValue = 8192
Field Value
Type | Description |
---|---|
ushort |
MaxPitchValue
Represents the largest possible pitch value.
Declaration
public const ushort MaxPitchValue = 16383
Field Value
Type | Description |
---|---|
ushort |
MinPitchValue
Represents the smallest possible pitch value.
Declaration
public const ushort MinPitchValue = 0
Field Value
Type | Description |
---|---|
ushort |
Properties
PitchValue
Gets or sets pitch value.
Declaration
public ushort PitchValue { get; set; }
Property Value
Type | Description |
---|---|
ushort |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | value is out of
[MinPitchValue; MaxPitchValue] range. |
Methods
CloneEvent()
Clones event by creating a copy of it.
Declaration
protected override MidiEvent CloneEvent()
Returns
Type | Description |
---|---|
MidiEvent | Copy of the event. |
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. |