new PlotMelodyContour( Plotly, divId [, plotLayout ] )

Description

Creates an instance of PlotMelodyContour

Parameters
Name Type Attributes Default Description
Plotly *

plotly.js global object import (see https://plotly.com/javascript/)

divId string

HTML div container id

plotLayout * <optional>
LayoutMelodyContour
Details

Methods


makeLinearSpace( start, stop, num ) → {Array}

Description

Returns evenly spaced samples, calculated over the interval [start, stop].

Parameters
Name Type Description
start *

The starting value of the sequence.

stop *

The end value of the sequence

num *

Number of samples to generate. Must be non-negative.

Returns
Details

create( featureArray, plotTitle, audioFrameSize, audioSampleRate )

Description

Create the single line plot with the given input array using Plotly.js

Parameters
Name Type Description
featureArray Float32Array

1D feature input array

plotTitle string

title of the plot

audioFrameSize number

length of input audio data in samples

audioSampleRate number

sample rate of input audio

Details

destroy()

Description

Destroy the existing Plotly traces

Details