Browse Source

Added callback to get number of keywaves of an on-screen seaboard view

tags/2021-05-28
hogliux 8 years ago
parent
commit
826fdfe6c9
3 changed files with 11 additions and 1 deletions
  1. +2
    -1
      modules/juce_blocks_basics/blocks/juce_Block.h
  2. +4
    -0
      modules/juce_blocks_basics/blocks/juce_TouchSurface.h
  3. +5
    -0
      modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp

+ 2
- 1
modules/juce_blocks_basics/blocks/juce_Block.h View File

@@ -43,7 +43,8 @@ public:
lightPadBlock,
liveBlock,
loopBlock,
developerControlBlock
developerControlBlock,
seaboardBlock // on-screen seaboard view
};
/** The Block class is reference-counted, so always use a Block::Ptr when


+ 4
- 0
modules/juce_blocks_basics/blocks/juce_TouchSurface.h View File

@@ -96,6 +96,10 @@ public:
/** Forces a touch-off message for all active touches. */
virtual void cancelAllActiveTouches() noexcept = 0;
/** For the on-screen seaboard view, this will return the number of keys.
For other types of touch-surface, it will return 0. */
virtual int getNumberOfKeywaves() const = 0;
//==============================================================================
/** Receives callbacks when a touch moves or changes pressure. */
struct Listener


+ 5
- 0
modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp View File

@@ -1416,6 +1416,11 @@ struct PhysicalTopologySource::Internal
det->activeTouchSurfaces.removeFirstMatchingValue (this);
}
int getNumberOfKeywaves() const noexcept override
{
return blockImpl.modelData.numKeywaves;
}
void broadcastTouchChange (const TouchSurface::Touch& touchEvent)
{
auto& status = touches.getValue (touchEvent);


Loading…
Cancel
Save