Package heronarts.lx.midi.surface
Class MixerSurface
java.lang.Object
heronarts.lx.midi.surface.MixerSurface
- All Implemented Interfaces:
LXParameterListener
Utility class to access a fixed number of mixer channels, potentially also
with clip/pattern grid control.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intHow many mixer channels this surface can control at oncefinal DiscreteParameterfinal DiscreteParameterfinal DiscreteParameter -
Constructor Summary
ConstructorsConstructorDescriptionMixerSurface(LX lx, MixerSurface.Listener listener, int bankWidth) MixerSurface(LX lx, MixerSurface.Listener listener, int bankWidth, int bankHeight) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(LXAbstractChannel channel) voidvoidvoidvoiddispose()intintgetChannel(int index) Retrieve channel for a given surface index, relative to current index.intintintintintgetIndex(LXAbstractChannel channel) Retrieve the index of a channel relative to surface.booleanhasGrid()voidvoidvoidvoidInvoked when the value of a parameter is changed.voidregister()setGridMode(LXClipEngine.GridMode gridMode) void
-
Field Details
-
bankWidth
public final int bankWidthHow many mixer channels this surface can control at once -
channelNumber
-
gridClipOffset
-
gridPatternOffset
-
-
Constructor Details
-
MixerSurface
-
MixerSurface
-
-
Method Details
-
onParameterChanged
Description copied from interface:LXParameterListenerInvoked when the value of a parameter is changed.- Specified by:
onParameterChangedin interfaceLXParameterListener- Parameters:
p- The parameter that has changed its value
-
setGridMode
-
hasGrid
public boolean hasGrid() -
getGridMode
-
getChannelIndex
public int getChannelIndex() -
incrementGridOffset
public void incrementGridOffset() -
decrementGridOffset
public void decrementGridOffset() -
getGridOffset
public int getGridOffset() -
getGridClipOffset
public int getGridClipOffset() -
getGridPatternOffset
public int getGridPatternOffset() -
getBankWidth
public int getBankWidth() -
getBankHeight
public int getBankHeight() -
incrementChannel
public void incrementChannel() -
decrementChannel
public void decrementChannel() -
incrementBank
public void incrementBank() -
decrementBank
public void decrementBank() -
getChannel
Retrieve channel for a given surface index, relative to current index. -
contains
-
getIndex
Retrieve the index of a channel relative to surface. If channel is not assigned to a surface position, -1 will be returned.- Parameters:
channel- The channel to find- Returns:
- Relative index of channel on surface, or -1 if not found
-
register
public void register() -
unregister
public void unregister() -
dispose
public void dispose()
-