use of de.mossgrabers.framework.daw.DefaultStepInfo in project DrivenByMoss by git-moss.
the class AbstractPolySequencerView method getStep.
/**
* Check if any note is set at the current step.
*
* @param clip The clip which contains the notes
* @param col The column/step to check
* @return The aggregated about the step aggregated from all notes at that step
*/
protected IStepInfo getStep(final INoteClip clip, final int col) {
final DefaultStepInfo result = new DefaultStepInfo();
boolean isMuted = true;
final int editMidiChannel = this.configuration.getMidiEditChannel();
for (int row = 0; row < 128; row++) {
final IStepInfo stepInfo = clip.getStep(editMidiChannel, col, row);
final StepState r = stepInfo.getState();
if (r == StepState.START)
result.setState(StepState.START);
else if (r == StepState.CONTINUE && result.getState() != StepState.START)
result.setState(StepState.CONTINUE);
if ((r == StepState.START || r == StepState.CONTINUE) && !stepInfo.isMuted())
isMuted = false;
}
result.setMuted(isMuted);
return result;
}
Aggregations