JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::DrumPadGridProgram Struct Reference

{Blocks} More...

#include <juce_DrumPadLEDProgram.h>

Inheritance diagram for juce::DrumPadGridProgram:
Collaboration diagram for juce::DrumPadGridProgram:

Classes

struct  GridFill
 Set how each pad in the grid looks. More...
 

Public Types

enum  SlideDirection : uint8 {
  up = 0,
  down = 1,
  left = 2,
  right = 3,
  none = 255
}
 Set up a new pad layout, with a slide animation from the old to the new. More...
 

Public Member Functions

 DrumPadGridProgram (Block &)
 
void endTouch (float startX, float startY)
 
virtual juce::Array< juce::FilegetSearchPaths ()
 Returns an array of search paths to use when resolving includes. More...
 
void resumeAnimations ()
 
void sendTouch (float x, float y, float z, LEDColour)
 Creates trail effects similar to the onscreen pad trails. More...
 
void setGridFills (int numColumns, int numRows, const juce::Array< GridFill > &)
 
void setPadAnimationState (uint32 padIdx, double loopTimeSecs, double currentProgress)
 Call this to match animations to the project tempo. More...
 
void startTouch (float startX, float startY)
 These let the program dim pads which aren't having gestures performed on them. More...
 
void suspendAnimations ()
 If the app needs to close down or suspend, use these to pause & dim animations. More...
 
void triggerSlideTransition (int newNumColumns, int newNumRows, const juce::Array< GridFill > &newFills, SlideDirection)
 

Public Attributes

Blockblock
 

Private Member Functions

juce::String getLittleFootProgram () override
 Returns the LittleFoot program to execute on the BLOCKS device. More...
 
juce::String getLittleFootProgramPost25 () const
 
juce::String getLittleFootProgramPre25 () const
 
int getPadIndex (float posX, float posY) const
 
void setGridFills (int numColumns, int numRows, const juce::Array< GridFill > &fills, uint32 byteOffset)
 

Static Private Attributes

static constexpr uint32 animationTimers_byte = 162
 
static constexpr uint32 colours0_byte = 2
 
static constexpr uint32 colours1_byte = 80
 
static constexpr uint32 colourSizeBytes = 2
 
static constexpr uint32 fillTypes0_byte = 52
 
static constexpr uint32 fillTypes1_byte = 130
 
static constexpr uint32 maxNumPads = 25
 
static constexpr uint32 numColumns0_byte = 0
 Shared data heap is laid out as below. More...
 
static constexpr uint32 numColumns1_byte = 78
 
static constexpr uint32 numRows0_byte = 1
 
static constexpr uint32 numRows1_byte = 79
 
static constexpr uint32 slideDirection_byte = 156
 
static constexpr uint32 totalHeapSize = 226
 
static constexpr uint32 touchedPads_byte = 158
 
static constexpr uint32 visiblePads_byte = 155
 

Detailed Description

{Blocks}

Member Enumeration Documentation

◆ SlideDirection

Set up a new pad layout, with a slide animation from the old to the new.

Enumerator
up 
down 
left 
right 
none 

Constructor & Destructor Documentation

◆ DrumPadGridProgram()

juce::DrumPadGridProgram::DrumPadGridProgram ( Block )

Member Function Documentation

◆ endTouch()

void juce::DrumPadGridProgram::endTouch ( float  startX,
float  startY 
)

◆ getLittleFootProgram()

juce::String juce::DrumPadGridProgram::getLittleFootProgram ( )
overrideprivatevirtual

Returns the LittleFoot program to execute on the BLOCKS device.

Implements juce::Block::Program.

◆ getLittleFootProgramPost25()

juce::String juce::DrumPadGridProgram::getLittleFootProgramPost25 ( ) const
private

◆ getLittleFootProgramPre25()

juce::String juce::DrumPadGridProgram::getLittleFootProgramPre25 ( ) const
private

◆ getPadIndex()

int juce::DrumPadGridProgram::getPadIndex ( float  posX,
float  posY 
) const
private

◆ getSearchPaths()

virtual juce::Array<juce::File> juce::Block::Program::getSearchPaths ( )
inlinevirtualinherited

Returns an array of search paths to use when resolving includes.

◆ resumeAnimations()

void juce::DrumPadGridProgram::resumeAnimations ( )

◆ sendTouch()

void juce::DrumPadGridProgram::sendTouch ( float  x,
float  y,
float  z,
LEDColour   
)

Creates trail effects similar to the onscreen pad trails.

◆ setGridFills() [1/2]

void juce::DrumPadGridProgram::setGridFills ( int  numColumns,
int  numRows,
const juce::Array< GridFill > &   
)

◆ setGridFills() [2/2]

void juce::DrumPadGridProgram::setGridFills ( int  numColumns,
int  numRows,
const juce::Array< GridFill > &  fills,
uint32  byteOffset 
)
private

◆ setPadAnimationState()

void juce::DrumPadGridProgram::setPadAnimationState ( uint32  padIdx,
double  loopTimeSecs,
double  currentProgress 
)

Call this to match animations to the project tempo.

Parameters
padIdxThe pad to update. 16 animated pads are supported, so 0 - 15.
loopTimeSecsThe length of time for the pad's animation to loop in seconds. 0 will stop the animation.
currentProgressThe starting progress of the animation. 0.0 - 1.0.

◆ startTouch()

void juce::DrumPadGridProgram::startTouch ( float  startX,
float  startY 
)

These let the program dim pads which aren't having gestures performed on them.

◆ suspendAnimations()

void juce::DrumPadGridProgram::suspendAnimations ( )

If the app needs to close down or suspend, use these to pause & dim animations.

◆ triggerSlideTransition()

void juce::DrumPadGridProgram::triggerSlideTransition ( int  newNumColumns,
int  newNumRows,
const juce::Array< GridFill > &  newFills,
SlideDirection   
)

Member Data Documentation

◆ animationTimers_byte

constexpr uint32 juce::DrumPadGridProgram::animationTimers_byte = 162
staticprivate

◆ block

Block& juce::Block::Program::block
inherited

◆ colours0_byte

constexpr uint32 juce::DrumPadGridProgram::colours0_byte = 2
staticprivate

◆ colours1_byte

constexpr uint32 juce::DrumPadGridProgram::colours1_byte = 80
staticprivate

◆ colourSizeBytes

constexpr uint32 juce::DrumPadGridProgram::colourSizeBytes = 2
staticprivate

◆ fillTypes0_byte

constexpr uint32 juce::DrumPadGridProgram::fillTypes0_byte = 52
staticprivate

◆ fillTypes1_byte

constexpr uint32 juce::DrumPadGridProgram::fillTypes1_byte = 130
staticprivate

◆ maxNumPads

constexpr uint32 juce::DrumPadGridProgram::maxNumPads = 25
staticprivate

◆ numColumns0_byte

constexpr uint32 juce::DrumPadGridProgram::numColumns0_byte = 0
staticprivate

Shared data heap is laid out as below.

There is room for two sets of pad layouts, colours and fill types to allow animation between two states.

◆ numColumns1_byte

constexpr uint32 juce::DrumPadGridProgram::numColumns1_byte = 78
staticprivate

◆ numRows0_byte

constexpr uint32 juce::DrumPadGridProgram::numRows0_byte = 1
staticprivate

◆ numRows1_byte

constexpr uint32 juce::DrumPadGridProgram::numRows1_byte = 79
staticprivate

◆ slideDirection_byte

constexpr uint32 juce::DrumPadGridProgram::slideDirection_byte = 156
staticprivate

◆ totalHeapSize

constexpr uint32 juce::DrumPadGridProgram::totalHeapSize = 226
staticprivate

◆ touchedPads_byte

constexpr uint32 juce::DrumPadGridProgram::touchedPads_byte = 158
staticprivate

◆ visiblePads_byte

constexpr uint32 juce::DrumPadGridProgram::visiblePads_byte = 155
staticprivate

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