com.amx.duet.tools.math
Class LevelUtil

java.lang.Object
  extended bycom.amx.duet.tools.math.LevelUtil

public class LevelUtil
extends java.lang.Object

A utility class for scaling and adjusting level values.


Field Summary
static int MAX_ADJUST
          maximum incremental adjust value for modules.
static int MAX_LVL
          maximum level range value for modules.
static int MIN_ADJUST
          maximum decremental adjust value for modules.
static int MIN_LVL
          minimum level range value for modules.
 
Constructor Summary
LevelUtil()
           
 
Method Summary
static int adjustLevel(int nLevel, int nOffset, int deviceMin, int deviceMax)
          Step the level value by a calculated scale value or by one in either direction.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIN_LVL

public static final int MIN_LVL
minimum level range value for modules.

See Also:
Constant Field Values

MAX_LVL

public static final int MAX_LVL
maximum level range value for modules.

See Also:
Constant Field Values

MIN_ADJUST

public static final int MIN_ADJUST
maximum decremental adjust value for modules.

See Also:
Constant Field Values

MAX_ADJUST

public static final int MAX_ADJUST
maximum incremental adjust value for modules.

See Also:
Constant Field Values
Constructor Detail

LevelUtil

public LevelUtil()
Method Detail

adjustLevel

public static int adjustLevel(int nLevel,
                              int nOffset,
                              int deviceMin,
                              int deviceMax)
Step the level value by a calculated scale value or by one in either direction. Otherwise, set the level value to 50%.

Parameters:
nLevel -
nOffset -
deviceMin -
deviceMax -
Returns:


Copyright © 2008 AMX LLC. All Rights Reserved.