VoiceLabels

class VoiceLabels(val names: Map<String, String>, val tint: (agent: String) -> Color?? = null, val bottom: androidx.compose.ui.unit.Dp = 16.dp, val backdrop: androidx.compose.ui.graphics.layer.GraphicsLayer? = null, val backdropOrigin: () -> Offset = { Offset.Zero }, val darken: Float = 0.0f, val scale: Float = 1.0f)(source)

Who sings each line, by the agent ids lines carry (v1, v2, …, v1000 for a group), and optionally a colour for each, which tints their capsule. Shown only when two voices or more have a name (a singer and their group count).

Constructors

Link copied to clipboard
constructor(names: Map<String, String>, tint: (agent: String) -> Color?? = null, bottom: androidx.compose.ui.unit.Dp = 16.dp, backdrop: androidx.compose.ui.graphics.layer.GraphicsLayer? = null, backdropOrigin: () -> Offset = { Offset.Zero }, darken: Float = 0.0f, scale: Float = 1.0f)

Properties

Link copied to clipboard
val backdrop: androidx.compose.ui.graphics.layer.GraphicsLayer?

What lies behind the lyrics, for the capsule to blur too: over a video, its picture. The host records it into this layer and tells where the layer stands on screen (backdropOrigin, in root coordinates). Without it the capsule blurs only the lyrics behind it.

Link copied to clipboard
val backdropOrigin: () -> Offset

Where backdrop stands, in root coordinates.

Link copied to clipboard
val bottom: androidx.compose.ui.unit.Dp

How far above the view's bottom edge it sits, clear of what the host lays over that edge.

Link copied to clipboard

Added to the capsule's own darkening (0.22), for a bright picture behind it. Above 0 it is laid over the blurred backdrop instead of the light frost.

Link copied to clipboard

The singers' names, by agent id, as parseTTMLAgentNames reads them.

Link copied to clipboard

The capsule's size against its own (13 sp names, 26 dp high): 1 leaves it.

Link copied to clipboard
val stageRoom: androidx.compose.ui.unit.Dp

How far BraccatoStage raises its floor for the capsule's own line: the capsule, its distance from the bottom, and a little air. A host drawing a second stage beside it (a shadow) without voices raises that one by the same.

Link copied to clipboard
val tint: (agent: String) -> Color??

A colour for a singer's capsule, or null for the default.

Link copied to clipboard

Whether there is anything to show: two named voices or more.