EventData
#include "crosspad/event/EventData.hpp"Generated from crosspad/event/EventData.hpp in crosspad-core. Edit the header’s doxygen comments to change this page.
Portable event data structures for CrossPad event system.
Recipes that use it: Tempo and transport, Motion and vibration, UI kit
crosspad::NoteOnData
Section titled “crosspad::NoteOnData”| Field | Type | Description |
|---|---|---|
channel | uint8_t | |
note | uint8_t | |
velocity | uint8_t | |
source | EventSource |
Declared in crosspad/event/EventData.hpp:16.
crosspad::NoteOffData
Section titled “crosspad::NoteOffData”| Field | Type | Description |
|---|---|---|
channel | uint8_t | |
note | uint8_t | |
velocity | uint8_t | |
source | EventSource |
Declared in crosspad/event/EventData.hpp:23.
crosspad::PadPressedData
Section titled “crosspad::PadPressedData”| Field | Type | Description |
|---|---|---|
padIdx | uint8_t | |
isOn | bool | |
velocity | uint8_t | |
source | EventSource |
Declared in crosspad/event/EventData.hpp:30.
crosspad::PadReleasedData
Section titled “crosspad::PadReleasedData”| Field | Type | Description |
|---|---|---|
padIdx | uint8_t | |
source | EventSource |
Declared in crosspad/event/EventData.hpp:37.
crosspad::AppChangedData
Section titled “crosspad::AppChangedData”Posted by the Sampler after a kit change.
| Field | Type | Description |
|---|---|---|
appName | char[32] | |
source | EventSource |
Members
| Member | Description |
|---|---|
setName |
Methods
setName
Section titled “setName”void setName(const char *name)Declared in crosspad/event/EventData.hpp:42.
crosspad::TempoChangedData
Section titled “crosspad::TempoChangedData”Used in Tempo and transport.
| Field | Type | Description |
|---|---|---|
bpm | float | |
source | EventSource |
Declared in crosspad/event/EventData.hpp:52.
crosspad::SamplePlaybackData
Section titled “crosspad::SamplePlaybackData”Used in UI kit.
| Field | Type | Description |
|---|---|---|
note | uint8_t | Pad index (0-15), or 16+ for preview channel. |
wavIdx | uint8_t | Actual sample index being played. |
isOn | bool | true = note on, false = note off |
velocity | uint8_t | 1-127 playback velocity (ignored when isOn = false) |
source | EventSource | |
transpose | int8_t | Semitones on top of the pad’s own pitch, for this note only: 16 levels of pitch play one pad’s sample from every pad. |
key | uint8_t | Which hit this is, for the release and the per-pad retrigger, when it is not the pad itself: two pads playing one sample at two pitches are two notes, not one note cut short. |
Declared in crosspad/event/EventData.hpp:57.
crosspad::LiveModeChangedData
Section titled “crosspad::LiveModeChangedData”| Field | Type | Description |
|---|---|---|
enabled | bool | |
source | EventSource |
Declared in crosspad/event/EventData.hpp:73.
MotionGesture
Section titled “MotionGesture”What the motion sensor recognised.
The names are the gestures, not a particular part’s register bits — a platform whose IMU knows fewer of them simply never posts the rest.
Used in Motion and vibration.
| Value | Value | Description |
|---|---|---|
SingleTap | ||
DoubleTap | ||
FreeFall | ||
WakeUp | motion after a still period | |
Orientation | the board was turned to another face | |
Still | no motion long enough for the sensor to say so |
Declared in crosspad/event/EventData.hpp:81.
crosspad::MotionGestureData
Section titled “crosspad::MotionGestureData”Used in Motion and vibration.
| Field | Type | Description |
|---|---|---|
gesture | MotionGesture | |
orientation | uint8_t | face the board rests on, meaningful for Orientation |
source | EventSource |
Declared in crosspad/event/EventData.hpp:90.
Variables
Section titled “Variables”| Declaration | Description |
|---|---|
constexpr uint8_t kSamplePlaybackOwnKey |