Skip to content

IPadLogicHandler

#include "crosspad/pad/IPadLogicHandler.hpp"

Generated from crosspad/pad/IPadLogicHandler.hpp in crosspad-core. Edit the header’s doxygen comments to change this page.

Recipes that use it: Pads and LEDs, Play a sample, MIDI out

Interface for application-specific pad logic handlers.

Each application (sequencer, sampler, etc.) can implement this interface to define custom behavior when pads are pressed, released, or receive pressure.

Used in Pads and LEDs, Play a sample, MIDI out.

Members

MemberDescription
onActivateCalled when this handler becomes the active pad logic.
onDeactivateCalled when this handler is deactivated.
onPadPressCalled when a pad is pressed (padIdx 0-15, velocity 0-127)
onPadReleaseCalled when a pad is released (padIdx 0-15)
onPadPressureCalled when pad pressure changes — aftertouch (padIdx 0-15, pressure 0-127)
onPadPanCalled when the press moves across the pad — left/right balance of the two cells under it, 0 centred. Streams while the pad is held, on change only. Optional: a handler that plays notes has no use for it.

Methods

virtual void onActivate(PadManager &padManager) = 0

Called when this handler becomes the active pad logic.

Used in Pads and LEDs, Play a sample.

Do not free state in onDeactivate that a pad callback may still read; keep it until the app object is destroyed.

virtual void onDeactivate(PadManager &padManager) = 0

Called when this handler is deactivated.

Used in Pads and LEDs, Play a sample, MIDI out.

virtual void onPadPress(PadManager &padManager, uint8_t padIdx, uint8_t velocity) = 0

Called when a pad is pressed (padIdx 0-15, velocity 0-127)

Used in Pads and LEDs, Play a sample, MIDI out.

virtual void onPadRelease(PadManager &padManager, uint8_t padIdx) = 0

Called when a pad is released (padIdx 0-15)

Used in Pads and LEDs, Play a sample, MIDI out.

virtual void onPadPressure(PadManager &padManager, uint8_t padIdx, uint8_t pressure) = 0

Called when pad pressure changes — aftertouch (padIdx 0-15, pressure 0-127)

Used in Pads and LEDs, MIDI out.

virtual void onPadPan(PadManager &padManager, uint8_t padIdx, int8_t pan)

Called when the press moves across the pad — left/right balance of the two cells under it, 0 centred. Streams while the pad is held, on change only. Optional: a handler that plays notes has no use for it.

Used in MIDI out.

Declared in crosspad/pad/IPadLogicHandler.hpp:15.