com.softsynth.jmsl.util
Class RandomizeMusicShapeEditorOperator

java.lang.Object
  extended by 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, didkovn@mail.rockefeller.edu

Constructor Summary
RandomizeMusicShapeEditorOperator()
           
 
Method Summary
 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 Detail

RandomizeMusicShapeEditorOperator

public RandomizeMusicShapeEditorOperator()
Method Detail

operate

public void operate(MusicShapeEditor se,
                    MusicShape s)
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 interface MusicShapeEditorOperator

getName

public java.lang.String getName()
Specified by:
getName in interface Namable

setName

public void setName(java.lang.String n)
Specified by:
setName in interface Namable