WaveClip data
An audio clip with a repeatable waveform and a replaceable header. Two clips can follow one edit signal.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| width | number (80 to 1200) | 360 | |
| label | string | "Voice · A" | |
| color | color | "accent" | |
| ink | color | "night" | |
| seed | number | 1 |
* required. Every node also takes the common props: id, motion, start, place, scale, rotate, opacity, w, h. A colour is a palette name, never a value.
Parts#
Named parts can be restyled from outside without making a new component: "parts": { "root": { … } }.
| Part | Is a |
|---|---|
| root | box |
| body | box |
| label | text |
Content it wraps#
| Slot | What goes in it |
|---|---|
| header | Clip label and track icons |
Fill a slot with a list of nodes: "slots": { "header": [ … ] }.
Example#
{"el": "WaveClip", "width": 620, "color": "#b8da74"}How it is made#
This component is plain data. Its whole definition is the tree below: copy it into a scene's components list under a new name to make your own version. See Custom components.
{
"el": "box",
"id": "body",
"w": "$width",
"h": 110,
"fill": "$color",
"radius": 9,
"pad": [12, 14],
"align": "start",
"justify": "between",
"clip": true,
"children": [
{
"$slot": "header",
"fallback": [
{
"el": "text",
"id": "label",
"text": "$label",
"color": "$ink",
"size": 34,
"weight": 650,
"font": "mono"
}
]
},
{
"el": "box",
"dir": "row",
"h": 46,
"gap": 3,
"align": "center",
"children": [
{
"$each": "=floor((width-25)/8)",
"node": {
"el": "shape",
"kind": "rect",
"w": 5,
"h": "=6+38*rand(index,seed)*(0.4+0.6*abs(sin(index*0.23)))",
"fill": "$ink",
"radius": 2
}
}
]
}
]
}