Arduino MIDI Library  Version 5.0.1
DefaultSettings Struct Reference

Default Settings for the MIDI Library. More...

#include <midi_Settings.h>

Static Public Attributes

static const bool UseRunningStatus = false
 
static const bool HandleNullVelocityNoteOnAsNoteOff = true
 
static const bool Use1ByteParsing = true
 
static const unsigned SysExMaxSize = 128
 
static const bool UseSenderActiveSensing = false
 
static const bool UseReceiverActiveSensing = false
 
static const uint16_t SenderActiveSensingPeriodicity = 0
 

Detailed Description

Default Settings for the MIDI Library.

To change the default settings, don't edit them there, create a subclass and override the values in that subclass, then use the MIDI_CREATE_CUSTOM_INSTANCE macro to create your instance. The settings you don't override will keep their default value. Eg:

struct MySettings : public midi::DefaultSettings
{
static const unsigned SysExMaxSize = 1024; // Accept SysEx messages up to 1024 bytes long.
};
MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial2, midi, MySettings);

Definition at line 49 of file midi_Settings.h.

Member Data Documentation

◆ HandleNullVelocityNoteOnAsNoteOff

const bool DefaultSettings::HandleNullVelocityNoteOnAsNoteOff = true
static

NoteOn with 0 velocity should be handled as NoteOf.
Set to true to get NoteOff events when receiving null-velocity NoteOn messages.
Set to false to get NoteOn events when receiving null-velocity NoteOn messages.

Definition at line 62 of file midi_Settings.h.

◆ SenderActiveSensingPeriodicity

const uint16_t DefaultSettings::SenderActiveSensingPeriodicity = 0
static

Active Sensing is intended to be sent repeatedly by the sender to tell the receiver that a connection is alive. Use of this message is optional. When initially received, the receiver will expect to receive another Active Sensing message each 300ms (max), and if it does not then it will assume that the connection has been terminated. At termination, the receiver will turn off all voices and return to normal (non- active sensing) operation.

Typical value is 250 (ms) - an Active Sensing command is send every 250ms. (All Roland devices send Active Sensing every 250ms)

Setting this field to 0 will disable sending MIDI active sensing.

Definition at line 101 of file midi_Settings.h.

◆ SysExMaxSize

const unsigned DefaultSettings::SysExMaxSize = 128
static

Maximum size of SysEx receivable. Decrease to save RAM if you don't expect to receive SysEx, or adjust accordingly.

Definition at line 73 of file midi_Settings.h.

◆ Use1ByteParsing

const bool DefaultSettings::Use1ByteParsing = true
static

Setting this to true will make MIDI.read parse only one byte of data for each call when data is available. This can speed up your application if receiving a lot of traffic, but might induce MIDI Thru and treatment latency.

Definition at line 68 of file midi_Settings.h.

◆ UseReceiverActiveSensing

const bool DefaultSettings::UseReceiverActiveSensing = false
static

Global switch to turn on/off receiver ActiveSensing Set to true to check for message timeouts (via ErrorCallback) Set to false will not check if chained device are still alive (if they use ActiveSensing) (will also save memory)

Definition at line 85 of file midi_Settings.h.

◆ UseRunningStatus

const bool DefaultSettings::UseRunningStatus = false
static

Running status enables short messages when sending multiple values of the same type and channel.
Must be disabled to send USB MIDI messages to a computer Warning: does not work with some hardware, enable with caution.

Definition at line 56 of file midi_Settings.h.

◆ UseSenderActiveSensing

const bool DefaultSettings::UseSenderActiveSensing = false
static

Global switch to turn on/off sender ActiveSensing Set to true to send ActiveSensing Set to false will not send ActiveSensing message (will also save memory)

Definition at line 79 of file midi_Settings.h.


The documentation for this struct was generated from the following file:
DefaultSettings::SysExMaxSize
static const unsigned SysExMaxSize
Definition: midi_Settings.h:73