Package com.softsynth.jmsl.util
Class RandomizeMusicShapeEditorOperator
java.lang.Object
com.softsynth.jmsl.util.RandomizeMusicShapeEditorOperator
- All Implemented Interfaces:
Namable
,MusicShapeEditorOperator
public class RandomizeMusicShapeEditorOperator extends java.lang.Object implements MusicShapeEditorOperator
Randomize values of selected elements within the min/max ranges set by user in MusicShapeEditor
- Author:
- Nick Didkovsky, nick@didkovsky.com
-
Constructor Summary
Constructors Constructor Description RandomizeMusicShapeEditorOperator()
-
Method Summary
Modifier and Type Method Description java.lang.String
getName()
void
operate(MusicShapeEditor se, MusicShape s)
randomize values within selected range of MusicShape, using the floor and ceiling values set by the user.void
setName(java.lang.String n)
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
RandomizeMusicShapeEditorOperator
public RandomizeMusicShapeEditorOperator()
-
-
Method Details
-
operate
randomize values within selected range of MusicShape, using the floor and ceiling values set by the user.if (se.getRangeStartIndex() != -1 && se.getRangeEndIndex() != -1 && Limits.within(se.getDimension(), 0, s.dimension() - 1)) { double min = se.getFloor(); double max = se.getCeiling(); int start = se.getRangeStartIndex(); int end = se.getRangeEndIndex(); int dim = se.getDimension(); s.randomize(min, max, start, end, dim); }
- Specified by:
operate
in interfaceMusicShapeEditorOperator
-
getName
public java.lang.String getName() -
setName
public void setName(java.lang.String n)
-