Package heronarts.lx.audio
Class SoundObject
java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.LXRunnableComponent
heronarts.lx.modulator.LXModulator
heronarts.lx.audio.SoundObject
- All Implemented Interfaces:
LXComponent.Renamable,LXLoopTask,LXPath,LXSerializable,LXOscComponent,LXNormalizedParameter,LXParameter,LXParameterListener,Comparable<SoundObject>
@LXCategory("Audio")
@Global("Sound Object")
public class SoundObject
extends LXModulator
implements Comparable<SoundObject>, LXOscComponent, LXNormalizedParameter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic classNested classes/interfaces inherited from class heronarts.lx.modulator.LXModulator
LXModulator.Device, LXModulator.Global, LXModulator.PlaceholderNested classes/interfaces inherited from class heronarts.lx.LXComponent
LXComponent.Description, LXComponent.Hidden, LXComponent.Name, LXComponent.PluginRequired, LXComponent.RenamableNested classes/interfaces inherited from interface heronarts.lx.parameter.LXNormalizedParameter
LXNormalizedParameter.OscModeNested classes/interfaces inherited from interface heronarts.lx.parameter.LXParameter
LXParameter.Collection, LXParameter.Formatter, LXParameter.Monitor, LXParameter.MultiMonitor, LXParameter.Polarity, LXParameter.UnitsNested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal DiscreteParameterfinal BooleanParameterfinal BoundedParameterfinal CompoundParameterfinal MutableParameterfinal BooleanParameterfinal CompoundParameterfinal CompoundParameterfinal DiscreteParameterfinal NormalizedParameterfinal BoundedParameterfinal BoundedParameterfinal LXVectorHolds the normalized position of the sound object, assuming that distance is set to 100%.final LXVectorHolds the position of the sound object in coordinate space where (.5, .5, .5) is the center.final DiscreteParameterfinal BoundedParameterFields inherited from class heronarts.lx.modulator.LXModulator
crashed, midiFilter, midiSourceFields inherited from class heronarts.lx.LXRunnableComponent
runMs, running, triggerFields inherited from class heronarts.lx.LXComponent
childArrays, children, internalParameters, KEY_CHILDREN, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_INTERNAL, KEY_PARAMETER_PATH, KEY_PARAMETERS, KEY_PATH, KEY_RESET, label, legacyInternalParameters, legacyParameters, lx, modulationColor, modulationControlsExpanded, modulationsExpanded, parameters, presetFileFields inherited from interface heronarts.lx.LXPath
DEFAULT_SEPARATOR, ROOT, ROOT_PREFIX, ROOT_SLASH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(SoundObject that) protected doublecomputeValue(double deltaMs) Implementation method to advance the modulator's internal state.voiddispose()Invoked when a component is being removed from the system and will no longer be used at all.static SoundObjectdoubleGets the value of the parameter in a normalized space from 0 to 1voidSubclasses are free to override this if desired.setNormalized(double value) Sets the value or the parameter in normalized space from 0 to 1voidMethods inherited from class heronarts.lx.modulator.LXModulator
autostart, disableAutoStart, getCrash, getCrashStackTrace, getFormatter, getIndex, getOscAddress, getOscPath, getPath, getPolarity, getUnits, getValue, isMappingSource, loop, onSetValue, run, setComponent, setFormatter, setIndex, setMappingSource, setPolarity, setUnits, setValue, setValue, updateValueMethods inherited from class heronarts.lx.LXRunnableComponent
isRunning, onReset, onStart, onStop, onTrigger, postRun, reset, start, stop, toggle, triggerMethods inherited from class heronarts.lx.LXComponent
addArray, addChild, addInternalParameter, addLegacyInternalParameter, addLegacyParameter, addParameter, addParameter, addParameters, assertDisposed, contains, copyParameters, getCategory, getChild, getComponentDescription, getComponentName, getComponentName, getComponentName, getDescription, getId, getLabel, getLX, getOscLabel, getParameter, getParameters, getParent, handleOscMessage, hasParameter, isValidOscParameter, load, loadParameters, loadPreset, removeParameter, removeParameter, removeParameter, removeParameter, save, savePreset, setDescription, setParent, toOscQuery, toOscQuery, toOscQuery, toString, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface heronarts.lx.parameter.LXNormalizedParameter
getBaseNormalized, getBaseNormalizedf, getExponent, getNormalizedf, getOscMode, getValueFromNormalized, isWrappableMethods inherited from interface heronarts.lx.osc.LXOscComponent
getOscAddress, handleOscMessageMethods inherited from interface heronarts.lx.parameter.LXParameter
getBaseValue, getBaseValuef, getFormatter, getLabel, getParentParameter, getPolarity, getUnits, getValue, getValuef, isMappable, reset, setComponent, setFormatter, setMappable, setValueMethods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getDescription, getParent, getPath, isDescendant
-
Field Details
-
admSync
-
admObjId
-
meterSource
-
audioMeterSource
-
envelopSource
-
reaperSource
-
input
-
meterFloor
-
meterCeiling
-
attackMs
-
releaseMs
-
azimuth
-
elevation
-
distance
-
cartesianChanged
-
controlsExpanded
-
position
Holds the position of the sound object in coordinate space where (.5, .5, .5) is the center. For distance values larger than 100%, values may fall outside of the bounds [0,1]. Note that this position is relative to the sound stage bounds, not the absolute space. -
normalized
Holds the normalized position of the sound object, assuming that distance is set to 100%. All values will fall in the range [-1,1] and the amplitude of this vector will be 1. Note that this position is relative to the sound stage bounds, not the absolute space.
-
-
Constructor Details
-
SoundObject
-
-
Method Details
-
get
-
onParameterChanged
Description copied from class:LXComponentSubclasses are free to override this if desired. It will automatically fire for any listenable parameter that is registered with this component.- Specified by:
onParameterChangedin interfaceLXParameterListener- Overrides:
onParameterChangedin classLXRunnableComponent- Parameters:
p- Parameter that has a value change
-
updateCartesian
public void updateCartesian() -
computeValue
protected double computeValue(double deltaMs) Description copied from class:LXModulatorImplementation method to advance the modulator's internal state. Subclasses must provide and update value appropriately.- Specified by:
computeValuein classLXModulator- Parameters:
deltaMs- Number of milliseconds to advance by- Returns:
- Computed value
-
setNormalized
Description copied from interface:LXNormalizedParameterSets the value or the parameter in normalized space from 0 to 1- Specified by:
setNormalizedin interfaceLXNormalizedParameter- Parameters:
value- The normalized value, from 0 to 1- Returns:
- this, for method chaining
-
getNormalized
public double getNormalized()Description copied from interface:LXNormalizedParameterGets the value of the parameter in a normalized space from 0 to 1- Specified by:
getNormalizedin interfaceLXNormalizedParameter- Returns:
- Value of parameter, normalized to range from 0 to 1
-
compareTo
- Specified by:
compareToin interfaceComparable<SoundObject>
-
dispose
public void dispose()Description copied from class:LXComponentInvoked when a component is being removed from the system and will no longer be used at all. This unregisters the component and should free up any resources and parameter listeners. Ideally after this method is called the object should be eligible for garbage collection. Subclasses are generally expected to override this method to handle their particular cleanup work. They should also generally callsuper.dispose()at the appropriate time to perform the basic cleanup, which may need to happen either before or after cleaning up other objects.- Specified by:
disposein interfaceLXParameter- Overrides:
disposein classLXComponent
-