braidio.structure#
Structural music — stings at scene breaks, fade-to-spotlight on exhibits.
The music bed (braidio.music) is the continuous music layer. This module
is the structural one: the cues that tell a listener where they are, because
audio has no visual white space (misc/docs/research/commentary-formats-and-
styles.md, “Music as structure”):
a sting — a short musical marker — at a
SceneBreak(“new section”);fade-to-spotlight — the bed drops out before a key exhibit so the clip lands in silence instead of competing with underscore, and resumes after it.
Both are driven by a MusicStructure: the format’s defaults
(scene_marker, spotlight_clips) plus the production’s Sting
asset. It is the single seam braidio.render.render_production() takes
(structure=); None means “no structure” and reproduces the plain weave
exactly. A beat overrides the defaults with SceneBreak.marker /
SegmentBeat.spotlight.
braidio ships no music: like the bed, the sting is an app-supplied asset
(render_format(..., sting_asset=…)). A scene break with no sting to play is
still audible — as MusicStructure.pause_s of silence — so the structure
is never silently lost.
Functions
|
Render |
|
Render |
Classes
|
How a production marks its structure with music — the render seam. |
|
A short musical marker played at a scene break. |
- class braidio.structure.MusicStructure(sting=None, scene_marker='sting', spotlight_clips=False, pause_s=0.8)[source]#
Bases:
objectHow a production marks its structure with music — the render seam.
scene_markeris the default for aSceneBreakwhosemarkerisNone("sting"/"none").spotlight_clipsis the default for aSegmentBeatwhosespotlightisNone—Truedrops the bed under every exhibit.stingis the production’s sting asset; with none supplied a"sting"-marked break falls back topause_sof silence.The all-defaults value is inert for a script with no scene breaks and no spotlight-marked clips: a format that declares no structure renders exactly as it did without this layer.
- marker_for(beat)[source]#
The marker a scene break renders with (its override, else the default).
- Return type:
- marker_of(marker)[source]#
The marker a break with this per-beat override renders with.
- Return type:
- plays_sting(beat)[source]#
Whether
beatplays the sting (marked"sting"and one is supplied).- Return type:
- plays_sting_of(marker)[source]#
Whether this per-beat marker plays the sting (and one is supplied).
- Return type:
- class braidio.structure.Sting(asset_path, gain_db=-6.0, max_len_s=3.0, fade_out_s=0.5, gap_after_s=0.3)[source]#
Bases:
objectA short musical marker played at a scene break.
asset_pathis an app-supplied sound (a hit, a riser, a few notes of the theme). It is trimmed tomax_len_swith afade_out_stail, levelled to the production’s loudness target, satgain_dbunder the voice, and followed bygap_after_sof breathing room before the talk resumes.
- braidio.structure.prepare_pause(seconds, out_path, *, sample_rate=44100)[source]#
Render
secondsof stereo silence — a scene break with no sting to play.- Return type:
- braidio.structure.prepare_sting(sting, out_path, *, target_lufs, sample_rate=44100)[source]#
Render
stingto a ready-to-place part: trimmed, faded, levelled, padded.The result is already at production level (
target_lufsthensting.gain_db), so the caller places it as-is rather than normalizing it again. Returnsout_path.- Return type: