Reverb

Reverb

new Reverb(optionsopt)

Source:
Properties:
Name Type Attributes Default Description
options.timeframe Number <optional>
10000

An alias for range_x.max, defining the maximum time of the chart.

options.delay Number <optional>
0

The initial delay of the input signal, not to be confused with predelay.

options.delay_min Number <optional>
0

The minimum delay.

options.delay_max Number <optional>
2000

The maximum delay.

options.gain Number <optional>
0

The gain for the input signal.

options.gain_min Number <optional>
-60

The minimum gain.

options.gain_max Number <optional>
0

The maximum gain.

options.predelay Number <optional>
0

The predelay of the diffuse reverb.

options.predelay_min Number <optional>
0

The minimum predelay.

options.predelay_max Number <optional>
2000

The maximum predelay.

options.rlevel Number <optional>
0

The level of the diffuse reverb.

options.rlevel_min Number <optional>
-60

The minimum reverb level.

options.rlevel_max Number <optional>
0

The maximum reverb level.

options.rtime Number <optional>
0

The duration of the diffuse reverb. This acts in conjunction with the reference option.

options.rtime_min Number <optional>
0

The minimum reverb time.

options.rtime_max Number <optional>
5000

The maximum reverb time.

options.erlevel Number <optional>
0

The level of the early reflections.

options.erlevel_min Number <optional>
-60

The minimum level of early reflections.

options.erlevel_max Number <optional>
0

The maximum level of early reflections.

options.attack Number <optional>
0

The attack time for the diffuse reverb.

options.noisefloor Number <optional>
-96

The noisefloor at which attack starts from.

options.reference Number <optional>
-60

The reference level for calculating the reverb time.

options.show_input Boolean <optional>
true

Draw the line showing the input signal.

options.show_input_handle Boolean <optional>
true

Show the handle defining input level and initial delay.

options.show_rlevel_handle Boolean <optional>
true

Show the handle defining reverb level and predelay.

options.show_rtime_handle Boolean <optional>
true

Show the handle defining the reverb time.

options.reflections Array | Object | Boolean <optional>
{amount: 0, spread: 0, randomness: 4}

Defines reflections to be displayed. Either an array of objects {time: n, level:n} where time is in milliseconds, level in decibel or an object {amount: n, spread: n, randomness: n} where spread is a time in milliseconds to spread the reflections, randomness in decibels to randomize the levels and amount the number of reflections to be created. false disables drawing of the reflections.

Reverb is a Chart with various handles to set and display parameters of a typical classic reverb.

Parameters:
Name Type Attributes Default Description
options Object <optional>
{ }

An object containing initial options.

Extends

Members

_graphs :SVGGroup

Source:
Inherited From:

The SVG group containing all graphs. Has class .aux-graphs.

Type:
  • SVGGroup

_handles :SVGGroup

Source:
Overrides:

The SVG group containing all handles. Has class .aux-handles.

Type:
  • SVGGroup

_key :SVGGroup

Source:
Inherited From:

The SVG group containing all descriptions. Has class .aux-key.

Type:
  • SVGGroup

_key_background :SVGRect

Source:
Inherited From:

The SVG rectangle of the key. Has class .aux-background.

Type:
  • SVGRect

_label :SVGText

Source:
Inherited From:

The label of the chart. Has class .aux-label.

Type:
  • SVGText

element :HTMLDivElement

Source:
Inherited From:

The main DIV container. Has class .aux-chart.

Type:
  • HTMLDivElement

graphs :Array

Source:
Inherited From:

An array containing all SVG paths acting as graphs.

Type:
  • Array

grid :Grid

Source:
Inherited From:

The grid element of the chart. Has class .aux-grid.

Type:

handles :Array

Source:
Inherited From:

An array containing all ChartHandle instances.

Type:
  • Array

input :Graph

Source:

The Graph displaying the input signal as a vertical bar.

Type:

input_handle :ChartHandle

Source:

The ChartHandle displaying/setting the initial delay and gain.

Type:

range_x :Range

Source:
Inherited From:

The Range for the x axis.

Type:

range_y :Range

Source:
Inherited From:

The Range for the y axis.

Type:

reverb :Graph

Source:

The Graph displaying the reverb signal as a triagle.

Type:

rlevel_handle :ChartHandle

Source:

The ChartHandle displaying/setting the pre delay and reverb level.

Type:

rtime_handle :ChartHandle

Source:

The ChartHandle displaying/setting the reverb time.

Type:

Methods

addChild(child)

Source:
Inherited From:
See:

Registers a widget as a child widget. This method is used to build up the widget tree. It does not modify the DOM tree.

Parameters:
Name Type Description
child Widget

The child to add.

Fires:
  • Widget#event:child_added

addChildren(a)

Source:
Inherited From:

Registers an array of widgets as children.

Parameters:
Name Type Description
a Array.<Widget>

An array of Widgets.

addGraph(graph) → {Object}

Source:
Inherited From:

Add a graph to the chart.

Parameters:
Name Type Description
graph Object

The graph to add. This can be either an instance of Graph or an object of options to Graph.

Fires:
Returns:

The instance of Graph.

Type
Object

addHandle(optionsopt, typeopt)

Source:
Inherited From:

Add a new handle to the widget. Options is an object containing options for the ChartHandle.

Parameters:
Name Type Attributes Default Description
options Object <optional>
{ }

An object containing initial options. - The options for the ChartHandle.

type Object <optional>
ChartHandle

A widget class to be used as the new handle.

Fires:

addHandles(options, typeopt)

Source:
Inherited From:

Add multiple new ChartHandle to the widget. Options is an array of objects containing options for the new instances of ChartHandle.

Parameters:
Name Type Attributes Default Description
options Array.<Object>

An array of options objects for the ChartHandle.

type Object <optional>
ChartHandle

A widget class to be used for the new handles.

allChildren()

Source:
Inherited From:

Returns an array of all children.

appendChild(child)

Source:
Inherited From:

Appends child.element to the widget element and registers child as a child widget.

Parameters:
Name Type Description
child Widget

The child widget to append.

appendChildren(children)

Source:
Inherited From:

Calls Widget#appendChild for an array of widgets.

Parameters:
Name Type Description
children Array.<Widget>

The child widgets to append.

disableTansitions()

Source:
Inherited From:

Disable CSS transitions.

empty()

Source:
Inherited From:

Remove all graphs from the chart.

Fires:

enableDraw()

Source:
Inherited From:

Schedules this widget for drawing.

Fires:

enableDrawChildren()

Source:
Inherited From:

Enables rendering for all children of this widget.

enableTransitions()

Source:
Inherited From:

Enable CSS transitions.

forceHide()

Source:
Inherited From:

Hide the widget immediately by applying the class aux-hide. Does not call disableDraw().

forceShow()

Source:
Inherited From:

Show the widget immediately by applying the class aux-show. Does not call enableDraw().

getStyle()

Source:
Inherited From:

Returns the computed style of this widget's DOM element.

hidden()

Source:
Inherited From:

Returns the current hidden status.

hide()

Source:
Inherited From:

Hide the widget. This will result in the class aux-hide being applied to this widget in the next rendering step.

invalidate(key)

Source:
Inherited From:

Invalidates an option and triggers a redraw() call.

Parameters:
Name Type Description
key string

observeResize(cb)

Source:
Inherited From:

Calls a callback whenever the widget resizes. This method will trigger one resize.

Parameters:
Name Type Description
cb function

removeChild(child)

Source:
Inherited From:

Removes a child widget. Note that this method only modifies the widget tree and does not change the DOM.

Parameters:
Name Type Description
child Widget

The child to remove.

Fires:
  • Widget#event:child_removed

removeChildren(a)

Source:
Inherited From:

Removes an array of children.

Parameters:
Name Type Description
a Array.<Widget>

An array of Widgets.

removeGraph(graph)

Source:
Inherited From:

Remove a graph from the chart.

Parameters:
Name Type Description
graph Graph

The Graph to remove.

Fires:

removeHandle(handle)

Source:
Inherited From:

Remove a handle from the widget.

Parameters:
Name Type Description
handle ChartHandle

The ChartHandle to remove.

Fires:

removeHandles(handles)

Source:
Inherited From:

Remove multiple or all ChartHandle from the widget.

Parameters:
Name Type Description
handles Array.<ChartHandle>

An array of ChartHandle instances. If the argument reveals to false, all handles are removed from the widget.

set(key, value)

Source:
Overrides:

Sets an option.

Parameters:
Name Type Description
key string

The option name.

value

The option value.

setStyle()

Source:
Inherited From:

Sets a CSS style property in this widget's DOM element.

show()

Source:
Inherited From:

Make the widget visible. This will apply the class aux-show during the next rendering step.

toggleHidden()

Source:
Inherited From:

Toggle the hidden status. This is equivalent to calling hide() or show(), depending on the current hidden status of this widget.

transitionsDisabled()

Source:
Inherited From:

Returns true if transitions are currently disabled on this widget.

visibleChildren()

Source:
Inherited From:

Returns an array of all visible children.

Events

destroy

Source:
Inherited From:

Is fired when a widget is destroyed.

doubleclick

Source:
Inherited From:

Is fired after a double click appeared. Set dblclick to 0 to disable click event handling.

Parameters:
Name Type Description
event string

The browsers MouseEvent.

emptied

Source:
Overrides:

Is fired when all graphs are removed from the chart.

GenericDOMEvents

Source:
Inherited From:

Generic DOM events. Please refer to W3Schools for further details.

graphadded

Source:
Inherited From:

Is fired when a graph was added. Arguments are the graph and its position in the array.

Parameters:
Name Type Description
graph Graph

The Graph which was added.

id int

The ID of the added Graph.

graphremoved

Source:
Inherited From:

Is fired when a graph was removed. Arguments are the graph and its position in the array.

Parameters:
Name Type Description
graph Graph

The Graph which was removed.

id int

The ID of the removed Graph.

handleadded

Source:
Inherited From:

Is fired when a new handle was added.

Parameters:
Name Type Description
handle ChartHandle

The ChartHandle which was added.

handleremoved

Source:
Inherited From:

Is fired when a handle was removed.

hide

Source:
Inherited From:

The hide event is emitted when a widget is hidden and is not rendered anymore. This happens both with browser visibility changes and also internally when using layout widgets such as Pager.

initialized

Source:
Inherited From:

Is fired when a widget is initialized.

redraw

Source:
Inherited From:

The redraw event is emitted when a widget is redrawn. This can be used to do additional DOM modifications to a Widget.

resize

Source:
Inherited From:

The resize event is emitted whenever a widget is being resized. This event can be used to e.g. measure its new size. Note that some widgets do internal adjustments after the resize event. If that is relevant, the Widget#resized event can be used instead.

resized

Source:
Inherited From:

The resized event is emitted after each rendering frame, which was triggered by a resize event.

set

Source:
Inherited From:

The set event is emitted when an option was set using the Widget#set method. The arguments are the option name and its new value.

Note that this happens both for user interaction and programmatical option changes.

show

Source:
Inherited From:

The show event is emitted when a widget is shown and is being rendered. This is the counterpart to Widget#hide.

visibility

Source:
Inherited From:

Is fired when the visibility state changes. The first argument is the visibility state, which is either true or false.