Package-level declarations

Types

Link copied to clipboard

Availability of a feature measurement. Ready silence has zero power; it is not unavailable.

Link copied to clipboard

A complete sample window on the source media timeline. Null times mean unknown, not zero.

Link copied to clipboard

Cumulative diagnostics for one shared analysis session. Poll these values for telemetry; they are not Compose state. Durations measure elapsed wall time, not thread CPU time.

Link copied to clipboard

One detector result. Availability is the newest media sample needed to produce this result.

Link copied to clipboard

Immutable publication of all detections of one source through an inclusive media-time watermark.

Link copied to clipboard

An accepted detection with an identity unique within one continuous analysis history. The identity is the source, generation, revision and sequence together; sequence numbers are comparable only within one source.

Link copied to clipboard

One view's ordered event reader across every source. Call from one consumer thread, with the authoritative media time. Initial attachment and gaps over 250 ms discard past bursts. A late transient may arrive up to 30 ms late and a late structural confirmation up to 3 s late; song map events are delivered on time only. sample reports every kind of discard. Pausing never emits an event.

Link copied to clipboard

Immutable events and accounting from one cursor sample; indexed access preserves multiplicity.

Link copied to clipboard

Retention diagnostics. Payload bytes exclude the bounded object/array/atomic-slot overhead.

Link copied to clipboard

Detected musical cues, separate from predicted beat-grid crossings and instrument identities.

Link copied to clipboard

Which publisher produced an event. Each source has its own completion watermark, sequence numbers, lateness budget and retention, so a slow source never holds back another.

Link copied to clipboard
@RequiresOptIn(level = RequiresOptIn.Level.WARNING, message = "The toolkit for writing drawings. It changes more often than the rest of the visualiser. Opt in with @OptIn(AudioVizAuthoringApi::class) to write a drawing of your own.")
annotation class AudioVizAuthoringApi

Marks the toolkit drawings are written with: the sound analysis, meshes, cameras, motion, grounds, warps, the finishing pass, and the low-level surfaces that draw them.

Link copied to clipboard

What the visualiser shows and how: the drawing, the palette, whether the director picks drawings with the music, and the finishing pass. Make one with rememberAudioVizState and show it with KiteAudioViz.

Link copied to clipboard

One consumer's delivery of a shared event. Zero lateness denotes normal interval delivery.

Link copied to clipboard

Shared-gain display heights: fast 10/120 ms, slow 100 ms/2 s, peak hold 500 ms then 12 dB/s.

Link copied to clipboard

Immutable energy display drivers from one analysis. All receive powerGain before the same fixed power-to-height curve. The raw measurements remain in SpectrumFrame.power.

Link copied to clipboard

A key estimated from pitched audio. Unknown keys are null, never a guess with low confidence. Confidence and correlation are scores against published key profiles, not probabilities.

Link copied to clipboard

Major or minor, the two modes the key profiles describe.

Link copied to clipboard

One stretch of a song map with one supported key.

Link copied to clipboard

Immutable unweighted spectral power from a complete symmetric Hann window.

Link copied to clipboard

Ungated 400 ms K-weighted programme power, with its own availability and measurement time.

Link copied to clipboard

Causal pulse estimates. Support values are heuristic scores, not probabilities of correctness. A usable beat phase does not establish meter, a downbeat or a phrase boundary.

Link copied to clipboard
class SongMap

What a background scan of one audio track found. Every field may be absent, and a partial map describes only its covered range. See docs/audioviz-song-scan-api.md.

Link copied to clipboard
interface SongMapStore

Where finished song maps are kept between runs of an application.

Link copied to clipboard
class SongScanPolicy(val localFiles: Boolean = true, val network: Boolean = false, val customReaders: Boolean = false)

Which items a background song scan may read. Local files scan by default; a network URI and an item with its own reader factory need the application's explicit consent, because a scan reads the whole track a second time. Live and read-once items never scan.

Link copied to clipboard
class SpectrumAnalyzer(fftSize: Int = 0, val bandCount: Int = 40, hop: Int = 0, scopePoints: Int = 256, sampleRate: Int, stereoPoints: Int = 512)

Causal, sample-timed audio analysis with per-channel power and one shared display gain.

Link copied to clipboard

One analysed moment of audio, ready to draw.

Link copied to clipboard

Retained feature payload, with bounded slot/object overhead in addition to the payload bytes.

Link copied to clipboard
class SpectrumTimeline(val capacity: Int = 128)

Bounded analysis history aligned to the audible media clock.

Link copied to clipboard

A retained event and the presentation seconds until its original estimated media time.

Link copied to clipboard

Projection of source channels into a decorative waveform. Speaker roles come from layout metadata.

Link copied to clipboard

Exact contiguous samples represented by a triggered raw trace. No analysis resampling is applied.

Properties

Link copied to clipboard

True when the media has sound and no picture of its own, which is when to show the visualiser.

Functions

Link copied to clipboard
fun AudioVizBrowser(state: AudioVizState, modifier: Modifier = Modifier, onPick: (Visualization) -> Unit = {})

Every drawing at once, each live in a small tile, in one flat grid searchable by name. Tapping a tile shows that drawing in state, then calls onPick so the caller can close the panel.

Link copied to clipboard
fun AudioVizSettings(state: AudioVizState, modifier: Modifier = Modifier, palettes: List<VizPalette> = VizPalette.entries)

The settings for state: the drawing's own settings and its recipe, the palette, the finishing pass, the render detail with a frame-time bar, and the director. Every control writes straight into what the drawing reads on its next frame, so a change shows at once.

Link copied to clipboard
fun KiteAudioViz(state: AudioVizState, modifier: Modifier = Modifier, post: Boolean = true)

Draws the sound the player is playing, with the drawing, palette and director in state.

Link copied to clipboard
fun rememberAudioVizState(player: KitePlayer, songScan: SongScanPolicy = SongScanPolicy.Default, songMapStore: SongMapStore = SongMapStore.None): AudioVizState

An AudioVizState that listens to player for as long as it stays in the composition.