SonoscopeOptions
type SonoscopeOptions = object;Options for initializing a Sonoscope coordinator instance.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
audio? | HTMLAudioElement | Optional HTML audio element to sync playback with. |
clipEnd? | number | Clip end boundary in seconds. Constrains playback and visualization. |
clipStart? | number | Clip start boundary in seconds. Constrains playback and visualization. |
endTime? | number | Initial viewport end time in seconds. |
followPlayback? | FollowPlaybackMode | Viewport follow mode during audio playback. Defaults to page. |
maxDuration? | number | Maximum zoom duration in seconds. |
maxFrequency? | number | Initial maximum frequency in Hz. |
minDuration? | number | Minimum zoom duration in seconds. |
minFrequency? | number | Initial minimum frequency in Hz. |
preferDecoded? | boolean | Prefer full decoded AudioBuffer over streaming. Defaults to false. |
preferStreaming? | boolean | Prefer streaming audio source when loading from URL. Defaults to true. |
sampleRate? | number | Target audio sample rate in Hz. |
smoothAnchor? | number | Screen anchor ratio (0 to 1) for smooth playback follow. |
source | AudioSource | Audio source for decoding and STFT computation. |
startTime? | number | Initial viewport start time in seconds. |
viewport? | IViewportController | Custom viewport controller to share coordinates across instances. |