SoundFontInfoLib  2.21.6
Library for parsing and rendering SF2 files
SF2::MIDI::Channel Class Reference

Collection of state values that pertains to a specific MIDI channel. More...

#include <Channel.hpp>

Public Types

using ContinuousControllerValues = std::array< short, CCMax - CCMin+1 >
 
using KeyPressureValues = std::array< short, Note::Max+1 >
 

Public Member Functions

 Channel ()
 Construct new channel. More...
 
void setKeyPressure (short key, short value)
 Set the pressure for a given key. More...
 
int keyPressure (short key) const
 Get the pressure for a given key. More...
 
void setChannelPressure (short value)
 Set the channel pressure. More...
 
int channelPressure () const
 
void setPitchWheelValue (short value)
 Set the pitch wheel value. More...
 
int pitchWheelValue () const
 
void setPitchWheelSensitivity (short value)
 Set the pitch wheel sensitivity value. More...
 
int pitchWheelSensitivity () const
 
void setContinuousControllerValue (short id, short value)
 Set a continuous controller value. More...
 
int continuousControllerValue (short id) const
 Get a continuous controller value. More...
 

Static Public Attributes

constexpr static short CCMin = 0
 
constexpr static short CCMax = 127
 

Detailed Description

Collection of state values that pertains to a specific MIDI channel.

Member Typedef Documentation

◆ ContinuousControllerValues

◆ KeyPressureValues

using SF2::MIDI::Channel::KeyPressureValues = std::array<short, Note::Max + 1>

Constructor & Destructor Documentation

◆ Channel()

SF2::MIDI::Channel::Channel ( )
inline

Construct new channel.

Member Function Documentation

◆ channelPressure()

int SF2::MIDI::Channel::channelPressure ( ) const
inline
Returns
the current channel pressure

◆ continuousControllerValue()

int SF2::MIDI::Channel::continuousControllerValue ( short  id) const
inline

Get a continuous controller value.

Parameters
idthe controller ID to get
Returns
the controller value

References CCMax, and CCMin.

◆ keyPressure()

int SF2::MIDI::Channel::keyPressure ( short  key) const
inline

Get the pressure for a given key.

Parameters
keythe key to get
Returns
the current pressure value for a key

References SF2::MIDI::Note::Max.

◆ pitchWheelSensitivity()

int SF2::MIDI::Channel::pitchWheelSensitivity ( ) const
inline
Returns
the current pitch wheel sensitivity value

◆ pitchWheelValue()

int SF2::MIDI::Channel::pitchWheelValue ( ) const
inline
Returns
the current pitch wheel value

◆ setChannelPressure()

void SF2::MIDI::Channel::setChannelPressure ( short  value)
inline

Set the channel pressure.

Parameters
valuethe pressure value to record

◆ setContinuousControllerValue()

void SF2::MIDI::Channel::setContinuousControllerValue ( short  id,
short  value 
)
inline

Set a continuous controller value.

Parameters
idthe controller ID
valuethe value to set for the controller

References CCMax, and CCMin.

◆ setKeyPressure()

void SF2::MIDI::Channel::setKeyPressure ( short  key,
short  value 
)
inline

Set the pressure for a given key.

Parameters
keythe key to set
valuethe pressure value to record

References SF2::MIDI::Note::Max.

◆ setPitchWheelSensitivity()

void SF2::MIDI::Channel::setPitchWheelSensitivity ( short  value)
inline

Set the pitch wheel sensitivity value.

Parameters
valuethe sensitivity value to record

◆ setPitchWheelValue()

void SF2::MIDI::Channel::setPitchWheelValue ( short  value)
inline

Set the pitch wheel value.

Parameters
valuethe pitch wheel value

Member Data Documentation

◆ CCMax

constexpr static short SF2::MIDI::Channel::CCMax = 127
inlinestaticconstexpr

◆ CCMin

constexpr static short SF2::MIDI::Channel::CCMin = 0
inlinestaticconstexpr

The documentation for this class was generated from the following file: