HISE Docs

ScriptAudioWaveform

Create a reference to a AudioWaveform UI component and modify its values.

const var AudioWaveform1 = Content.getComponent("AudioWaveform1");


Class methods

addToMacroControl

Adds the knob / button to a macro controller (from 0 to 7).

ScriptAudioWaveform.addToMacroControl(int macroIndex)



changed

Call this to indicate that the value has changed (the onControl callback will be executed.

ScriptAudioWaveform.changed()



createLocalLookAndFeel

Returns a local look and feel if it was registered before.

ScriptAudioWaveform.createLocalLookAndFeel(ScriptContentComponent *contentComponent, Component *componentToRegister)



fadeComponent

Toggles the visibility and fades a component using the global animator.

ScriptAudioWaveform.fadeComponent(bool shouldBeVisible, int milliseconds)



get

returns the value of the property.

ScriptAudioWaveform.get(String propertyName)



getAllProperties

Returns a list of all property IDs as array.

ScriptAudioWaveform.getAllProperties()



getChildComponents

Returns list of component's children

ScriptAudioWaveform.getChildComponents()



getGlobalPositionX

Returns the absolute x-position relative to the interface.

ScriptAudioWaveform.getGlobalPositionX()



getGlobalPositionY

Returns the absolute y-position relative to the interface.

ScriptAudioWaveform.getGlobalPositionY()



getHeight

Returns the height of the component.

ScriptAudioWaveform.getHeight()



getId

Returns the ID of the component.

ScriptAudioWaveform.getId()



getLocalBounds

Returns a [x, y, w, h] array that was reduced by the given amount.

ScriptAudioWaveform.getLocalBounds(float reduceAmount)



getRangeEnd

Returns the current range end.

ScriptAudioWaveform.getRangeEnd()



getRangeStart

Returns the current range start.

ScriptAudioWaveform.getRangeStart()



getValue

Returns the current value.

ScriptAudioWaveform.getValue()



getValueNormalized

Returns the normalized value.

ScriptAudioWaveform.getValueNormalized()



getWidth

Returns the width of the component.

ScriptAudioWaveform.getWidth()



grabFocus

Call this method in order to grab the keyboard focus for this component.

ScriptAudioWaveform.grabFocus()



loseFocus

Call this method in order to give away the focus for this component.

ScriptAudioWaveform.loseFocus()



referToData

Connects this AudioFile to an existing ScriptAudioFile object. -1 sets it back to its internal data object.

ScriptAudioWaveform.referToData(var audioData)



registerAtParent

Registers this waveform to the script processor to be acessible from the outside.

ScriptAudioWaveform.registerAtParent(int pIndex)



sendRepaintMessage

Manually sends a repaint message for the component.

ScriptAudioWaveform.sendRepaintMessage()



set

Sets the property.

ScriptAudioWaveform.set(String propertyName, var value)



setColour

sets the colour of the component (BG, IT1, IT2, TXT).

ScriptAudioWaveform.setColour(int colourId, int colourAs32bitHex)



setConsumedKeyPresses

Registers a selection of key presses to be consumed by this component.

ScriptAudioWaveform.setConsumedKeyPresses(var listOfKeys)



setControlCallback

Pass a inline function for a custom callback event.

ScriptAudioWaveform.setControlCallback(var controlFunction)



setDefaultFolder

Set the folder to be used when opening the file browser.

ScriptAudioWaveform.setDefaultFolder(var newDefaultFolder)



setKeyPressCallback

Adds a callback to react on key presses (when this component is focused).

ScriptAudioWaveform.setKeyPressCallback(var keyboardFunction)



setLocalLookAndFeel

Attaches the local look and feel to this component.

ScriptAudioWaveform.setLocalLookAndFeel(var lafObject)



setPlaybackPosition

Sets the playback position.

ScriptAudioWaveform.setPlaybackPosition(double normalisedPosition)



setPosition

Sets the position of the component.

ScriptAudioWaveform.setPosition(int x, int y, int w, int h)



setPropertiesFromJSON

Restores all properties from a JSON object.

ScriptAudioWaveform.setPropertiesFromJSON( var jsonData)



setStyleSheetClass

Sets the given class selectors for the component stylesheet.

ScriptAudioWaveform.setStyleSheetClass( String classIds)



setStyleSheetProperty

Sets a variable for this component that can be queried from a style sheet.

ScriptAudioWaveform.setStyleSheetProperty( String variableId,  var value,  String type)



setStyleSheetPseudoState

Programatically sets a pseudo state (:hover, :active, :checked, :focus, :disabled) that will be used by the CSS renderer.

ScriptAudioWaveform.setStyleSheetPseudoState( String pseudoState)



setTooltip

Shows a informative text on mouse hover.

ScriptAudioWaveform.setTooltip( String tooltip)



setValue

Sets the current value

ScriptAudioWaveform.setValue(var newValue)



setValueNormalized

Sets the current value from a range 0.0 ... 1.0.

ScriptAudioWaveform.setValueNormalized(double normalizedValue)



setValueWithUndo

Sets the current value and adds it to the undo list. Don't call this from onControl!

ScriptAudioWaveform.setValueWithUndo(var newValue)



setZLevel

Changes the depth hierarchy (z-axis) of sibling components (Back, Default, Front or AlwaysOnTop).

ScriptAudioWaveform.setZLevel(String zLevel)



showControl

Hides / Shows the control.

ScriptAudioWaveform.showControl(bool shouldBeVisible)



updateContentPropertyInternal

This updates the internal content data object from the script processor.

ScriptAudioWaveform.updateContentPropertyInternal(int propertyId,  var newValue)



updateValueFromProcessorConnection

Updates the value from the processor connection. Call this method whenever the module state has changed and you want to refresh the knob value to show the current state.

ScriptAudioWaveform.updateValueFromProcessorConnection()